feat(ci): wire e2e-ci into pull-request.yml and push-main.yml - #45
Merged
Conversation
Adds an e2e job to both workflows that starts the Caddy-fronted E2E stack against the freshly-built image (pr-<N> on pull requests, next after promotion on push to main) and runs pnpm e2e-ci against it, uploading the Playwright report as an artifact on failure.
This was referenced Aug 12, 2026
NoNamer777
commented
Aug 12, 2026
pull-request.yml and push-main.yml duplicated the whole E2E job verbatim aside from needs: and IMAGE_TAG. Factor it into .github/actions/e2e, taking image-tag as an input, matching the existing ci/prepare-workspace composite action pattern.
…t ones The e2e job needed the docker job to run, which only builds when Docker-relevant paths change. A pull request touching only the E2E suite (specs, playwright.config.ts, or the e2e composite action) never triggered a rebuild, so e2e was skipped and the change went unvalidated. Rename detect-docker-changes to detect-relevant-changes and add a second e2e filter output. Run the e2e job whenever either filter matches. When only E2E-relevant paths changed, test against the existing next tag instead of rebuilding pr-<N>, since the app image is unchanged. Apply the same logic to push-main.yml's e2e job for E2E-only merges, to guard against next having moved between the PR's own run and merge time.
3 tasks
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
Wires the
pnpm e2e-ciscript into CI, per Add Playwright end-to-end testing's Notes: a newe2ejob in bothpull-request.ymlandpush-main.ymlthat starts the Caddy-fronted E2E stack (Build the Caddy-fronted Docker Compose E2E stack) against the built image and runs the E2E suite against it.pull-request.yml: thee2ejob now runs whenevercisucceeds and either thedockerjob succeeded or only E2E-relevant paths changed. It tests the freshly builtpr-<N>image in the first case, and the existingnextimage in the second, since there's nothing new to build.push-main.yml: thee2ejob follows the same logic againstpromote-image, always testingnext. There's nothing to promote for an E2E-only merge, so it validates the currentnextinstead..github/actions/detect-relevant-changes(renamed fromdetect-docker-changes) now computes two independent filters,dockerande2e. That means a pull request touching only the E2E suite itself (specs,playwright.config.ts, thee2ecomposite action, or the workflow files) still triggers the E2E job. Previously thee2ejob only ran vianeeds: [docker], so E2E-only changes were silently skipped. See ADR 0006 for whynextis reused instead of rebuilding in that case.prepare-workspace, install Playwright's Chromium browser,docker compose -f .docker/compose.e2e.yaml up -d --wait, thenpnpm e2e-ciwithE2E_BASE_URL=https://localhost:8443. No explicit teardown, matching the stack's own design.reports/e2e(the Playwright HTML report plustest-results, including traces from the existingon-first-retrysetting) as ane2e-reportartifact, so a failing run leaves something to debug from.Verified the YAML parses and matches this repo's Prettier formatting. This PR's own commits only touch E2E-relevant paths, so its CI run is also the first real proof that the trigger fix works.
Related issues
Resolves #44, part of #38
Checklist