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
13 changes: 8 additions & 5 deletions .github/workflows/checks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,14 @@ jobs:
browser-projects:
name: browser-tests (${{ matrix.browser }} ${{ matrix.file }})
runs-on: ubuntu-26.04
timeout-minutes: 10
timeout-minutes: 5
# Playwright's image comes with its browsers and the system packages they need
# (https://playwright.dev/docs/ci#via-containers), so nothing is installed here.
# Its version must match @playwright/test in package.json, or the tests fail
# to find their browsers. Pinned by digest, like the actions in actions.lock.
container:
image: mcr.microsoft.com/playwright:v1.64.1-noble@sha256:2f05f8a734509a7b3f26a912639488ee08f58a7b292d14d62271bcff9038768f
options: --user 1001
strategy:
fail-fast: false # report every project
matrix:
Expand All @@ -56,10 +63,6 @@ jobs:

- run: npm ci

# Not cached: Playwright's docs say restoring takes about as long as downloading.
- name: Install the browser
run: npx playwright install --with-deps --only-shell ${{ matrix.browser }}

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

# The required check: passes only if every project passed, so the required
Expand Down
5 changes: 4 additions & 1 deletion playwright.config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,10 @@ const filesByBrowser = { chromium: ['pace.js', 'pace.min.js'], firefox: ['pace.m
export default defineConfig({
testDir: 'tests',
forbidOnly: CI,
workers: CI ? 1 : undefined,
// The tests spend their time waiting for pace's timers and their own requests, not on the
// CPU, so they run in parallel, also within a file; on CI, one worker per CPU core.
fullyParallel: true,
workers: CI ? '100%' : undefined,
reporter: CI ? [['github'], ['list']] : 'list',
projects: browsers.flatMap((browser) =>
filesByBrowser[browser].map((paceFile) => ({
Expand Down
Loading