Skip to content

Merge pull request #303 from NielsPilgaard/feature/githubaction-testl… #161

Merge pull request #303 from NielsPilgaard/feature/githubaction-testl…

Merge pull request #303 from NielsPilgaard/feature/githubaction-testl… #161

name: Website Frontend - Run Tests
on:
push:
paths:
- "src/web/Jordnaer.Client/**"
- "tests/web/Jordnaer.E2E.Tests/**"
- ".github/workflows/website_frontend_ci.yml"
workflow_dispatch:
env:
WORKING_DIRECTORY: tests/web/Jordnaer.E2E.Tests
jobs:
playwright:
runs-on: ubuntu-latest
container:
image: mcr.microsoft.com/playwright/dotnet:v1.41.2-jammy
options: --user 1001
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Set up dotnet
uses: actions/setup-dotnet@v4
with:
dotnet-version: "8.x"
- name: Test
# Dependabot cannot access secrets, so we disable this step for Dependabot
if: github.actor != 'dependabot[bot]' && github.actor != 'dependabot-preview[bot]'
run: >
dotnet test "${{ env.WORKING_DIRECTORY }}"
--logger "GitHubActions;summary.includePassedTests=true;summary.includeSkippedTests=true"
--filter Category!=ManualTest
env:
ConnectionStrings__AppConfig: ${{ secrets.AZURE_APP_CONFIGURATION_CONNECTION_STRING }}
- name: Upload Screenshots
if: always()
uses: actions/upload-artifact@v4
with:
name: screenshots
path: "${{ env.WORKING_DIRECTORY }}/bin/Debug/screenshots"