Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 16 additions & 11 deletions .github/workflows/checks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,15 +31,20 @@ jobs:
- name: List package contents
run: npm pack --dry-run

# One job per engine, in parallel.
browser-engines:
name: browser-tests (${{ matrix.browser }})
# One job per Playwright project (an engine and a pace file), in parallel.
browser-projects:
name: browser-tests (${{ matrix.browser }} ${{ matrix.file }})
runs-on: ubuntu-26.04
timeout-minutes: 10
strategy:
fail-fast: false # report every engine
fail-fast: false # report every project
matrix:
browser: [chromium, firefox, webkit]
# Every project in playwright.config.mjs; one missing here isn't tested in CI.
include:
- { browser: chromium, file: pace.js }
- { browser: chromium, file: pace.min.js }
- { browser: firefox, file: pace.min.js }
- { browser: webkit, file: pace.min.js }
steps:
- uses: actions/checkout@v7.0.1
with:
Expand All @@ -55,17 +60,17 @@ jobs:
- name: Install the browser
run: npx playwright install --with-deps --only-shell ${{ matrix.browser }}

- run: npm run test:browsers -- --project="${{ matrix.browser }} *"
- run: npm run test:browsers -- --project="${{ matrix.browser }} ${{ matrix.file }}"

# The required check: passes only if every engine passed, so the required
# checks stay the same when engines change.
# The required check: passes only if every project passed, so the required
# checks stay the same when projects change.
browser-tests:
needs: browser-engines
needs: browser-projects
if: always()
runs-on: ubuntu-26.04
timeout-minutes: 1
steps:
- name: Check that every engine passed
- name: Check that every project passed
env:
RESULT: ${{ needs.browser-engines.result }}
RESULT: ${{ needs.browser-projects.result }}
run: test "$RESULT" = success
4 changes: 2 additions & 2 deletions playwright.config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ import { defineConfig, devices } from '@playwright/test';

const CI = Boolean(process.env.CI);

// CI runs every engine (one job each, picked with --project); locally only Chromium
// (npx playwright install --only-shell chromium).
// CI runs every engine, each project in its own job (listed in .github/workflows/checks.yml);
// locally only Chromium (npx playwright install --only-shell chromium).
const browsers = CI ? ['chromium', 'firefox', 'webkit'] : ['chromium'];
const devicesByBrowser = { chromium: 'Desktop Chrome', firefox: 'Desktop Firefox', webkit: 'Desktop Safari' };

Expand Down
Loading