fix(ci): build before test and install Playwright browsers in pages workflow - #397
Merged
Merged
Conversation
…orkflow 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>
|
Note Gemini is unable to generate a review for this pull request due to the file types involved not being currently supported. |
|
JosephSamirL
approved these changes
May 25, 2026
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.



Summary
The
Updating Github pagesworkflow has been failing on every push tomainsince the Karma→Playwright migration (commitbe7e235). Two issues, both fixed here:1. Build runs after test, but the integration test requires the build output
packages/js-sdk/tests/integration/full-chain.spec.ts:5:lib/is the rollup output produced byyarn build. The current order inGenerating coverage and docswasyarn testthenyarn build, so Playwright's test-file discovery crashed:The crash happens before any browser even launches.
2. Playwright's bundled chromium was never installed
The workflow installs system
google-chrome-stable(Karma-era leftover), but Playwright uses its own bundled chromium binary, not the system Chrome. Withoutplaywright install, the browser tests would fail at browser-launch time even after fixing (1).Why this didn't bite us in PRs
qa.ymlalready had both pieces in place: it runsyarn buildbeforeyarn test:mocha/yarn test:browser, and it runsyarn playwright install --with-deps chromium. So PR-time checks pass whilepages.ymlhas been red on every merge.This change brings
pages.ymlinto alignment.Note
The system
google-chrome-stableinstall block is left untouched — it's now redundant with--with-depsdoing the same thing via apt-get, but removing it is scope-creep cleanup that should be a separate PR.Test plan
Updating Github pagesrun onmaincompletes successfully.🤖 Generated with Claude Code