|
| 1 | +name: "tests webkit wsl" |
| 2 | + |
| 3 | +on: |
| 4 | + push: |
| 5 | + branches: |
| 6 | + - main |
| 7 | + - release-* |
| 8 | + pull_request: |
| 9 | + paths-ignore: |
| 10 | + - 'browser_patches/**' |
| 11 | + - 'docs/**' |
| 12 | + - 'packages/playwright/src/mcp/**' |
| 13 | + - 'tests/mcp/**' |
| 14 | + branches: |
| 15 | + - main |
| 16 | + - release-* |
| 17 | + workflow_dispatch: |
| 18 | + |
| 19 | +env: |
| 20 | + # Force terminal colors. @see https://www.npmjs.com/package/colors |
| 21 | + FORCE_COLOR: 1 |
| 22 | + |
| 23 | +permissions: |
| 24 | + id-token: write # This is required for OIDC login (azure/login) to succeed |
| 25 | + contents: read # This is required for actions/checkout to succeed |
| 26 | + |
| 27 | +jobs: |
| 28 | + test_webkit_wsl: |
| 29 | + name: "Tests @ WebKit WSL ${{ matrix.headed && '(headed)' || '(headless)' }}" |
| 30 | + runs-on: ["self-hosted", "1ES.Pool=DevDivPlaywrightWindows11"] |
| 31 | + strategy: |
| 32 | + fail-fast: false |
| 33 | + matrix: |
| 34 | + headed: [true, false] |
| 35 | + steps: |
| 36 | + - uses: actions/checkout@v6 |
| 37 | + - uses: actions/setup-node@v6 |
| 38 | + with: |
| 39 | + node-version: 20 |
| 40 | + # WebKit in WSL only reaches servers on the Windows host with mirrored networking. |
| 41 | + - name: Enable WSL2 networkingMode=mirrored |
| 42 | + shell: powershell |
| 43 | + run: Add-Content -Path $env:USERPROFILE\.wslconfig -Value "[wsl2]`nnetworkingMode=mirrored" |
| 44 | + - run: npm ci |
| 45 | + env: |
| 46 | + DEBUG: pw:install |
| 47 | + PLAYWRIGHT_SKIP_BROWSER_DOWNLOAD: 1 |
| 48 | + - run: npm run build |
| 49 | + - run: npx playwright install webkit-wsl ffmpeg |
| 50 | + - name: Run tests |
| 51 | + run: npm run wtest -- ${{ matrix.headed && '--headed' || '' }} |
| 52 | + env: |
| 53 | + PWTEST_CHANNEL: webkit-wsl |
| 54 | + PW_TAG: "@webkit-wsl-${{ matrix.headed && 'headed' || 'headless' }}" |
| 55 | + - name: Azure Login |
| 56 | + if: always() |
| 57 | + uses: azure/login@v2 |
| 58 | + with: |
| 59 | + client-id: ${{ secrets.AZURE_FLAKINESS_DASHBOARD_CLIENT_ID }} |
| 60 | + tenant-id: ${{ secrets.AZURE_FLAKINESS_DASHBOARD_TENANT_ID }} |
| 61 | + subscription-id: ${{ secrets.AZURE_FLAKINESS_DASHBOARD_SUBSCRIPTION_ID }} |
| 62 | + - run: ./utils/upload_flakiness_dashboard.sh ./test-results/report.json |
| 63 | + if: always() |
| 64 | + shell: bash |
| 65 | + - uses: actions/upload-artifact@v7 |
| 66 | + if: ${{ !cancelled() }} |
| 67 | + with: |
| 68 | + name: webkit-wsl-${{ matrix.headed && 'headed' || 'headless' }}-results |
| 69 | + path: test-results |
0 commit comments