Merge pull request #127 from magiccodingman/test/strong-pr-validation #6
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Browser validation | |
| on: | |
| workflow_call: | |
| pull_request: | |
| push: | |
| branches: | |
| - master | |
| workflow_dispatch: | |
| concurrency: | |
| group: browser-validation-${{ github.event.pull_request.number || github.ref }} | |
| cancel-in-progress: true | |
| permissions: | |
| contents: read | |
| env: | |
| DOTNET_CLI_TELEMETRY_OPTOUT: true | |
| DOTNET_NOLOGO: true | |
| jobs: | |
| browser-validation: | |
| name: ${{ matrix.name }} | |
| timeout-minutes: 35 | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| include: | |
| - name: Chrome integration | |
| os: ubuntu-latest | |
| browser: chromium | |
| - name: Firefox integration | |
| os: ubuntu-latest | |
| browser: firefox | |
| - name: Linux WebKit integration | |
| os: ubuntu-latest | |
| browser: webkit | |
| - name: macOS WebKit integration | |
| os: macos-15 | |
| browser: webkit | |
| runs-on: ${{ matrix.os }} | |
| steps: | |
| - name: Check out source | |
| uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7 | |
| with: | |
| persist-credentials: false | |
| - name: Set up .NET 10 | |
| uses: actions/setup-dotnet@a98b56852c35b8e3190ac28c8c2271da59106c68 # v6 | |
| with: | |
| dotnet-version: 10.0.x | |
| - name: Restore browser tests | |
| run: dotnet restore E2eTest/E2eTest.csproj | |
| - name: Build browser tests | |
| run: dotnet build E2eTest/E2eTest.csproj --configuration Release --no-restore | |
| - name: Install browser and Linux dependencies | |
| if: ${{ runner.os == 'Linux' }} | |
| shell: pwsh | |
| run: E2eTest/bin/Release/net10.0/playwright.ps1 install --with-deps ${{ matrix.browser }} | |
| - name: Install browser on macOS | |
| if: ${{ runner.os == 'macOS' }} | |
| shell: pwsh | |
| run: E2eTest/bin/Release/net10.0/playwright.ps1 install ${{ matrix.browser }} | |
| - name: Run browser integration tests | |
| if: ${{ runner.os == 'Linux' }} | |
| run: >- | |
| dotnet test E2eTest/E2eTest.csproj | |
| --configuration Release | |
| --no-build | |
| --no-restore | |
| --logger "trx;LogFileName=${{ matrix.browser }}-${{ runner.os }}.trx" | |
| --results-directory artifacts/test-results | |
| -- | |
| Playwright.BrowserName=${{ matrix.browser }} | |
| Playwright.LaunchOptions.Headless=true | |
| - name: Run macOS WebKit open and registration tests | |
| if: ${{ runner.os == 'macOS' }} | |
| run: >- | |
| dotnet test E2eTest/E2eTest.csproj | |
| --configuration Release | |
| --no-build | |
| --no-restore | |
| --filter "FullyQualifiedName~E2eTest.OpenTest" | |
| --logger "trx;LogFileName=webkit-macOS-open.trx" | |
| --results-directory artifacts/test-results | |
| -- | |
| Playwright.BrowserName=webkit | |
| Playwright.LaunchOptions.Headless=true | |
| - name: Run macOS WebKit CRUD and streaming tests | |
| if: ${{ runner.os == 'macOS' }} | |
| run: >- | |
| dotnet test E2eTest/E2eTest.csproj | |
| --configuration Release | |
| --no-build | |
| --no-restore | |
| --filter "FullyQualifiedName~E2eTest.SingleRecordBasicTest" | |
| --logger "trx;LogFileName=webkit-macOS-crud-streaming.trx" | |
| --results-directory artifacts/test-results | |
| -- | |
| Playwright.BrowserName=webkit | |
| Playwright.LaunchOptions.Headless=true | |
| - name: Run macOS WebKit query tests | |
| if: ${{ runner.os == 'macOS' }} | |
| run: >- | |
| dotnet test E2eTest/E2eTest.csproj | |
| --configuration Release | |
| --no-build | |
| --no-restore | |
| --filter "FullyQualifiedName~E2eTest.WhereTest" | |
| --logger "trx;LogFileName=webkit-macOS-query.trx" | |
| --results-directory artifacts/test-results | |
| -- | |
| Playwright.BrowserName=webkit | |
| Playwright.LaunchOptions.Headless=true | |
| - name: Run macOS WebKit cursor tests | |
| if: ${{ runner.os == 'macOS' }} | |
| run: >- | |
| dotnet test E2eTest/E2eTest.csproj | |
| --configuration Release | |
| --no-build | |
| --no-restore | |
| --filter "FullyQualifiedName~E2eTest.CursorTest" | |
| --logger "trx;LogFileName=webkit-macOS-cursor.trx" | |
| --results-directory artifacts/test-results | |
| -- | |
| Playwright.BrowserName=webkit | |
| Playwright.LaunchOptions.Headless=true | |
| - name: Upload browser test results | |
| if: ${{ always() }} | |
| uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7 | |
| with: | |
| name: browser-${{ matrix.browser }}-${{ runner.os }}-${{ github.run_attempt }} | |
| path: artifacts/test-results/*.trx | |
| if-no-files-found: warn | |
| overwrite: true |