Skip to content

Write HTML. Render video. Built for agents.

ci: use path-based skip instead of paths-ignore for required checks

James7adcb2322d8f
diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
index f88f89e125..f13a6ab0bc 100644
--- a/.github/workflows/ci.yml
+++ b/.github/workflows/ci.yml
@@ -2,24 +2,41 @@ name: CI
on:
pull_request:
- paths-ignore:
- - "docs/**"
- - "*.md"
- - "DOCS_GUIDELINES.md"
push:
branches: [main]
- paths-ignore:
- - "docs/**"
- - "*.md"
- - "DOCS_GUIDELINES.md"
concurrency:
group: ci-${{ github.ref }}
cancel-in-progress: true
jobs:
+ changes:
+ name: Detect changes
+ runs-on: ubuntu-latest
+ timeout-minutes: 2
+ outputs:
+ code: ${{ steps.filter.outputs.code }}
+ steps:
+ - uses: actions/checkout@v4
+ - uses: dorny/paths-filter@v3
+ id: filter
+ with:
+ filters: |
+ code:
+ - "packages/**"
+ - "scripts/**"
+ - "package.json"
+ - "pnpm-lock.yaml"
+ - "pnpm-workspace.yaml"
+ - "tsconfig*.json"
+ - "Dockerfile*"
+ - ".github/workflows/ci.yml"
+ - ".github/workflows/regression.yml"
+
build:
name: Build
+ needs: changes
+ if: needs.changes.outputs.code == 'true'
runs-on: ubuntu-latest
timeout-minutes: 10
steps:
@@ -36,6 +53,8 @@ jobs:
typecheck:
name: Typecheck
+ needs: changes
+ if: needs.changes.outputs.code == 'true'
runs-on: ubuntu-latest
timeout-minutes: 10
steps:
@@ -53,6 +72,8 @@ jobs:
test-core:
name: "Test: core"
+ needs: changes
+ if: needs.changes.outputs.code == 'true'
runs-on: ubuntu-latest
timeout-minutes: 10
steps:
@@ -69,6 +90,8 @@ jobs:
test-engine:
name: "Test: engine"
+ needs: changes
+ if: needs.changes.outputs.code == 'true'
runs-on: ubuntu-latest
timeout-minutes: 10
steps:
@@ -85,6 +108,8 @@ jobs:
test-runtime-contract:
name: "Test: runtime contract"
+ needs: changes
+ if: needs.changes.outputs.code == 'true'
runs-on: ubuntu-latest
timeout-minutes: 10
steps:
diff --git a/.github/workflows/regression.yml b/.github/workflows/regression.yml
index 6839c403a8..c2a27f9b90 100644
--- a/.github/workflows/regression.yml
+++ b/.github/workflows/regression.yml
@@ -2,20 +2,33 @@ name: regression
on:
pull_request:
- paths-ignore:
- - "docs/**"
- - "*.md"
- - "DOCS_GUIDELINES.md"
push:
branches:
- main
- paths-ignore:
- - "docs/**"
- - "*.md"
- - "DOCS_GUIDELINES.md"
jobs:
+ changes:
+ name: Detect changes
+ runs-on: ubuntu-latest
+ timeout-minutes: 2
+ outputs:
+ code: ${{ steps.filter.outputs.code }}
+ steps:
+ - uses: actions/checkout@v4
+ - uses: dorny/paths-filter@v3
+ id: filter
+ with:
+ filters: |
+ code:
+ - "packages/**"
+ - "scripts/**"
+ - "Dockerfile*"
+ - "pnpm-lock.yaml"
+ - ".github/workflows/regression.yml"
+
regression-shards:
+ needs: changes
+ if: needs.changes.outputs.code == 'true'
runs-on: ubuntu-latest
timeout-minutes: 40
strategy:
@@ -91,11 +104,15 @@ jobs:
# Summary job — matches the required check name in branch protection
regression:
runs-on: ubuntu-latest
- needs: regression-shards
+ needs: [changes, regression-shards]
if: always()
steps:
- - name: Check shard results
+ - name: Check results
run: |
+ if [ "${{ needs.changes.outputs.code }}" != "true" ]; then
+ echo "No code changes — skipping regression (auto-pass)"
+ exit 0
+ fi
if [ "${{ needs.regression-shards.result }}" != "success" ]; then
echo "One or more regression shards failed"
exit 1