Skip to content

fix(ci): build before test and install Playwright browsers in pages workflow - #397

Merged
JosephSamirL merged 1 commit into
mainfrom
fix/pages-build-and-playwright
May 25, 2026
Merged

fix(ci): build before test and install Playwright browsers in pages workflow#397
JosephSamirL merged 1 commit into
mainfrom
fix/pages-build-and-playwright

Conversation

@abbaseya

Copy link
Copy Markdown
Collaborator

Summary

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

packages/js-sdk/tests/integration/full-chain.spec.ts:5:

const SDK = require('../../lib/index');

lib/ is the rollup output produced by yarn build. The current order in Generating coverage and docs was yarn test then yarn build, so Playwright's test-file discovery crashed:

Error: Cannot find module '../../lib/index'
Require stack:
- .../packages/js-sdk/tests/integration/full-chain.spec.ts
- .../node_modules/playwright/lib/transform/transform.js

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. Without playwright install, the browser tests would fail at browser-launch time even after fixing (1).

Why this didn't bite us in PRs

qa.yml already had both pieces in place: it runs yarn build before yarn test:mocha/yarn test:browser, and it runs yarn playwright install --with-deps chromium. So PR-time checks pass while pages.yml has been red on every merge.

This change brings pages.yml into alignment.

Note

The system google-chrome-stable install block is left untouched — it's now redundant with --with-deps doing the same thing via apt-get, but removing it is scope-creep cleanup that should be a separate PR.

Test plan

  • After merge, the merge commit's auto-triggered Updating Github pages run on main completes successfully.
  • Verify the gh-pages branch is updated with fresh docs/coverage.

🤖 Generated with Claude Code

…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>
@gemini-code-assist

Copy link
Copy Markdown

Note

Gemini is unable to generate a review for this pull request due to the file types involved not being currently supported.

@sonarqubecloud

Copy link
Copy Markdown

@abbaseya
abbaseya requested a review from a team May 25, 2026 17:27
@abbaseya abbaseya self-assigned this May 25, 2026
@JosephSamirL
JosephSamirL merged commit 34f0a7a into main May 25, 2026
6 checks passed
@JosephSamirL
JosephSamirL deleted the fix/pages-build-and-playwright branch May 25, 2026 17:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants