Skip to content

ci: run the hledger-web browser tests - #2712

Draft
acinader wants to merge 1 commit into
plaintextaccounting:mainfrom
acinader:ci-web-browser-tests
Draft

ci: run the hledger-web browser tests#2712
acinader wants to merge 1 commit into
plaintextaccounting:mainfrom
acinader:ci-web-browser-tests

Conversation

@acinader

@acinader acinader commented Sep 1, 2026

Copy link
Copy Markdown
Contributor

The Playwright suite in hledger-web/test/browser has not run anywhere automatically since it
merged. This adds a web-e2e job to ci.yml that runs it on every pull request.

What it costs

Nothing extra to build. The job takes the hledger-linux-x64 artifact the ci job already
uploads, 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, and pnpm install --ignore-scripts.
  • @playwright/test pins the chromium build it downloads, so pnpm-lock.yaml fixes the browser
    version as well as the packages.
  • 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.

Verification

Both paths exercised on my fork:

This PR is mergeable but marked draft to comply with open PR policy.

AI usage: Claude Opus 5, ~30k output tokens

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
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.

1 participant