Skip to content

Commit

Permalink
Add action to run end to end tests
Browse files Browse the repository at this point in the history
  • Loading branch information
mtdunlap committed Jan 11, 2025
1 parent 21ec3c8 commit 0e3811b
Showing 1 changed file with 43 additions and 0 deletions.
43 changes: 43 additions & 0 deletions .github/workflows/end-to-end-tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
name: End to End Tests

on:
pull_request:
branches: [ "main" ]

jobs:
build:

timeout-minutes: 60
runs-on: ubuntu-latest
strategy:
matrix:
dotnet-version: [ '9.x' ]
browser: [ "chromium", "firefox", "webkit" ]

steps:
- uses: actions/checkout@v4
- name: Setup dotnet
uses: actions/setup-dotnet@v4
with:
dotnet-version: ${{ matrix.dotnet-version }}
- name: Restore dependencies
run: dotnet restore
- name: Build
run: dotnet build --no-restore
- name: Ensure browsers are installed
run: pwsh tests/EndToEndTests/bin/Debug/net9.0/playwright.ps1 install --with-deps ${{ matrix.browser }}
- name: Test
run: dotnet test tests/EndToEndTests --settings:tests/tests/EndToEndTests/${{ matrix.browser }}.runsettings --no-build --verbosity normal --logger trx --results-directory "EndToEndTestResults-${{ matrix.browser }}-${{ matrix.dotnet-version }}"
- name: Upload test results
uses: actions/upload-artifact@v4
with:
name: dotnet-end-to-end-test-results-${{ matrix.browser }}-${{ matrix.dotnet-version }}
path: EndToEndTestResults-${{ matrix.browser }}-${{ matrix.dotnet-version }}
if: ${{ always() }}
- name: Upload playwright trace results
uses: actions/upload-artifact@v4
with:
name: playwright-traces-${{ matrix.browser }}-${{ matrix.dotnet-version }}
path: tests/EndToEndTests/bin/Debug/net9.0/playwright-traces
if-no-files-found: ignore
if: ${{ always() }}

0 comments on commit 0e3811b

Please sign in to comment.