Repository navigation
ci: run Playwright in its own image, sharded - #157
Merged
Merged
Conversation
`task e2e` ran `playwright install --with-deps` in CI, which runs apt on every run; in home-portal a slow Ubuntu mirror hung it until the job's 30-minute limit (JorisJonkers-dev/home-portal#95). The e2e jobs now run in the Playwright image for the version the lockfile resolves, against one prebuilt binary, two shards per device, merged into one HTML report. A container job has no compose, so Postgres, Mailpit and Vault are service containers and the migration and transit keys run as container steps from compose's images; the suite reads their addresses from E2E_* variables, defaulting to the compose ports. `task e2e:ci` is the suite alone, so local `task e2e` is unchanged. As JorisJonkers-dev/template-go-vue#13.
Mutation reportEvery mutant on the changed lines was caught by a test. This report never fails the build. |
A cold mise cache installs every linter too, minutes of a job that needs four tools. Through the shims, not `mise exec`, which would install the rest anyway.
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.
Why
task e2erunsplaywright install --with-deps chromium, so every CI run installed the browsers' system packages through apt. In home-portal that apt step hung on a slow Ubuntu mirror until the job's 30-minute limit, and the tests never ran (JorisJonkers-dev/home-portal#95). Same fix as the template's, JorisJonkers-dev/template-go-vue#13.What
mcr.microsoft.com/playwright:v<version>-noble, the image for exactly the@playwright/testversionpnpm-lock.yamlresolves, read by the build job so Renovate bumps keep working.HOME=/rootfor the container's root user; mise installs only node, pnpm and task there.End-to-end buildrunstask buildand hands the binary to the shards as an artifact. Both jobs keep theappbucket gate.task dbbecomes:migrateas adocker://step from the same pinnedliquibase-runnerimage (ci up 000000000000), andvault-initas one fromhashicorp/vault:1.21.4, both on the job's network.E2E_SMTP_ADDR,E2E_VAULT_ADDRandE2E_MAILPIT_URL, each defaulting to the compose port it used before, so local runs are unchanged. Prefixed so aVAULT_ADDRin someone's shell never reaches the suite.desktopandphone× 2 shards, four jobs at once, 15-minute limit,fail-fast: false.list);End-to-end reportmerges them into one HTML artifact and is not part ofPipeline Complete, which now also waits for the build.task e2e:ciis the suite alone, with Playwright options after--.Checks
actionlint,task lint:web,task secretspass locally.postgres:16-alpine, Mailpit and Vault on a docker network under their service names; the migration and transit-key commands run exactly as the steps run them (workspace as working directory); thentask e2e:ciinsidemcr.microsoft.com/playwright:v1.64.1-noble: desktop 1/2 and 2/2 11 + 11 passed, phone 22 passed.