Skip to content

Commit a12beae

Browse files
abbaseyaclaude
andcommitted
fix(ci): build before test and install Playwright browsers in pages workflow
The `Updating Github pages` workflow has been failing on every push to main since the Karma→Playwright migration (commit be7e235). Two issues, both fixed here: 1. **Build runs AFTER test, but the integration test requires the build output.** `tests/integration/full-chain.spec.ts:5` does `require('../../lib/index')` at module load time. `lib/` is the rollup output produced by `yarn build`. The current step order in `Generating coverage and docs` was `yarn test` then `yarn build`, so Playwright's test-file discovery crashed with `Error: Cannot find module '../../lib/index'` before any browser even launched. 2. **Playwright's bundled chromium was never installed.** The workflow installs system `google-chrome-stable` (a Karma-era leftover), but Playwright uses its own bundled chromium binary, not the system Chrome. Without `playwright install`, the browser tests would have failed at browser-launch time even after fixing (1). `qa.yml` already had both pieces in place — that's why PR-time checks have been passing while `pages.yml` has been red on every merge. This change brings `pages.yml` into alignment. The system Chrome install block is left untouched here — removing it is scope-creep cleanup that should be a separate PR. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
1 parent d78455e commit a12beae

1 file changed

Lines changed: 6 additions & 1 deletion

File tree

.github/workflows/pages.yml

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,11 +35,16 @@ jobs:
3535
- name: Installing npm packages
3636
run: yarn install --immutable
3737

38+
- name: Install Playwright browsers
39+
run: |
40+
cd packages/js-sdk
41+
yarn playwright install --with-deps chromium
42+
3843
- name: Generating coverage and docs
3944
run: |
4045
cd packages/js-sdk
41-
yarn test
4246
yarn build
47+
yarn test
4348
4449
- name: Checkout gh-pages
4550
uses: actions/checkout@v3

0 commit comments

Comments
 (0)