ci: run the hledger-web browser tests - #2712
Draft
acinader wants to merge 1 commit into
Draft
Conversation
The Playwright suite in hledger-web/test/browser has not run anywhere automatically since it merged. This adds a web-e2e job that runs it on every pull request, reusing the hledger-web the ci job already built and uploaded, so it adds no Haskell build time. The job reports failures rather than hiding them, but it is not a required check, so it does not block merging. These tests track the web UI's current behavior, so a PR that changes the UI on purpose has to update them, which needs node and a ~550M browser download. That is a reason to see how often it actually bites before making this a merge gate, not a reason to start with the result suppressed. - The ci job now exposes its do-all flag as an output, so the browser job skips along with it when the last commit message begins with ";". - permissions: contents: read, and --ignore-scripts: this is the only job that runs code from the npm registry. - @playwright/test pins the chromium build it downloads, so pnpm-lock.yaml fixes the browser version too, and keys the cache. - HLEDGER_WEB is set explicitly. Otherwise global-setup.js sees stack.yaml at the repo root and tries "stack exec -- hledger-web", which this job has no stack setup for. AI usage: Claude Opus 5, ~30k output tokens
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.
The Playwright suite in
hledger-web/test/browserhas not run anywhere automatically since itmerged. This adds a
web-e2ejob toci.ymlthat runs it on every pull request.What it costs
Nothing extra to build. The job takes the
hledger-linux-x64artifact thecijob alreadyuploads, so there is no second Haskell build. The suite itself is 24 tests in ~9s; the whole job
is ~40s cold, less once the browser cache is warm.
Reporting, not gating
The job reports failures rather than suppressing them, but it is not a required status check, so
it does not block merging.
These tests track the web UI's current behavior, so a PR that changes the
UI deliberately has to update them, and doing that needs node plus a ~550M browser download
so I'd like to observe them for a bit.
Notes
permissions: contents: read, andpnpm install --ignore-scripts.@playwright/testpins the chromium build it downloads, sopnpm-lock.yamlfixes the browserversion as well as the packages.
HLEDGER_WEBis set explicitly: otherwiseglobal-setup.jsseesstack.yamlat the repo rootand tries
stack exec -- hledger-web, which this job has no stack setup for.Verification
Both paths exercised on my fork:
ciandweb-e2egreen,24 passed
cigreen,web-e2ered, failure attributed to the right test, and the playwright reportuploaded as an artifact
This PR is mergeable but marked draft to comply with open PR policy.
AI usage: Claude Opus 5, ~30k output tokens