Add CI workflow: typecheck, unit, e2e, build#102
Merged
Conversation
The Playwright suite sat broken for 2.5 months (136/146 failing since trailingSlash 'always' landed) because nothing ran it. This workflow runs astro check + vitest + the full Playwright suite on every PR and push to main, with a parallel production-build job, and uploads the Playwright traces on failure.
Root cause of the CI-only failures: @netlify/dev loads _redirects and netlify.toml header rules from the publish directory (dist/). Locally a stale dist/ from prior builds masked this; CI never has one, so all redirect and cache-header tests 404'd. The build step now runs in the test job before Playwright (replacing the separate build job), and the prerequisite is documented in playwright.config.ts. Diagnostic steps removed.
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
Adds
.github/workflows/ci.yml— the repo currently has no CI, which is how the Playwright suite sat 136/146 broken for 2.5 months (fixed in #101) without anyone noticing.Two parallel jobs on every PR and push to
main:npm ci→astro check→vitest→ Playwright (chromium) full suite, with traces/report uploaded as an artifact on failurenpm run buildto catch build-only breakageDetails:
reuseExistingServerdisabled whenCIis set)Testing
All four commands pass locally on
mainas of #101 (143/143 e2e, 49/49 unit, cleanastro checkand build). The workflow itself will get its first real run on this PR.