From 86d9f8efca5e2e5b1015629a1b0f603525870937 Mon Sep 17 00:00:00 2001 From: John Brecht Date: Mon, 15 Jun 2026 15:28:34 -0700 Subject: [PATCH] ci: skip Chromium install + e2e render for docs-only changes MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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) --- .github/workflows/ci.yml | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index ae5c6cd..bd3f655 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -9,18 +9,35 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v5 + # Skip the expensive Chromium install + e2e render only when every changed + # file is docs/markdown/license — anything else runs the full gate. + - uses: dorny/paths-filter@v3 + id: changes + with: + predicate-quantifier: 'every' + filters: | + docs_only: + - 'docs/**' + - '**/*.md' + - 'LICENSE' + - 'COMMERCIAL.md' - uses: pnpm/action-setup@v4 - uses: actions/setup-node@v5 with: node-version: 22 cache: pnpm + # ffmpeg is needed by the unit tests too (cache.test.ts normalizes audio), + # so it always installs — only Chromium + the e2e render are gated below. - run: sudo apt-get update && sudo apt-get install -y ffmpeg fonts-liberation fonts-noto-color-emoji - run: pnpm install --frozen-lockfile - run: pnpm build - run: pnpm typecheck - run: pnpm --filter tutorial-forge test - - run: pnpm --filter tutorial-forge-example-app exec playwright install --with-deps chromium + - name: Install Playwright Chromium + if: steps.changes.outputs.docs_only != 'true' + run: pnpm --filter tutorial-forge-example-app exec playwright install --with-deps chromium - name: E2E render against example app + if: steps.changes.outputs.docs_only != 'true' run: pnpm --filter tutorial-forge-example-app e2e - name: Publish dry-run run: pnpm --filter tutorial-forge --filter tutorial-forge-cli publish --dry-run --no-git-checks