ci: skip Chromium install + e2e render for docs-only changes#58
Merged
Conversation
A dorny/paths-filter step sets docs_only=true only when EVERY changed file is under docs/, *.md, LICENSE, or COMMERCIAL.md. The two expensive steps — the Playwright Chromium install (--with-deps) and the e2e render (~3 min total) — are gated on docs_only != 'true', so a docs/README PR skips them while any code/config/lockfile change runs the full gate. ffmpeg installs unconditionally (it's cheap and the unit tests need it — cache.test.ts normalizes audio through it), and build/typecheck/unit always run, so docs PRs still get a meaningful green check. Conservative by design: a mixed PR (docs + code) fails the 'every' predicate, so it runs e2e. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
33d5947 to
86d9f8e
Compare
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.
Skips the expensive part of CI (Playwright Chromium install + e2e render — ~3 min) when a PR changes only docs.
How
A
dorny/paths-filterstep withpredicate-quantifier: 'every'setsdocs_only=trueonly when every changed file matchesdocs/**,**/*.md,LICENSE, orCOMMERCIAL.md. The Chromium install and e2e render are gated ondocs_only != 'true'.cache.test.tsnormalizes audio through ffmpeg), and it's cheap (~20s). Build/typecheck/unit always run too, so docs PRs still get a meaningful green check.everypredicate → full gate runs. Only a 100%-docs change skips Chromium + e2e.testjob always runs and reports, so this stays correct if required-status-check branch protection is added later.Note
This PR touches only
.github/workflows/ci.yml, so it runs the full gate — confirming the normal path is intact. (An earlier revision also moved the ffmpeg install behind the gate, which broke the ffmpeg-dependent unit test; fixed by keeping ffmpeg unconditional.)🤖 Generated with Claude Code