Skip to content

Commit 89f2bbc

Browse files
authored
chore(ci): centralize path filters (#624)
1 parent 8a2754f commit 89f2bbc

2 files changed

Lines changed: 24 additions & 15 deletions

File tree

‎.github/filters.yml‎

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
# Keep fixture and template Markdown/metadata covered; exclude docs by location.
2+
# Workflows use token: '' for git-based detection without PR API permissions.
3+
# All rules are exclusions, combined with predicate-quantifier: every.
4+
changed:
5+
- '!*.{md,mdx}'
6+
- '!packages/*/{README*,CHANGELOG*,AGENTS}.md'
7+
- '!{.agents,.vscode}/**'
8+
- '!.github/ISSUE_TEMPLATE/**'
9+
- '!.github/{FUNDING.yml,renovate.json,renovate.json5,PULL_REQUEST_TEMPLATE.md}'
10+
- '!{skills-lock.json,skills.json,cspell.config.*}'
11+
- '!scripts/dictionary.txt'
12+
- '!website/**'

‎.github/workflows/test.yml‎

Lines changed: 12 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -29,50 +29,47 @@ jobs:
2929

3030
- uses: dorny/paths-filter@ceb8a2b8f2d89434be7ff52d3de7ec3738c5cc9d # v4.0.3
3131
id: changes
32+
# Manual runs leave the output unset; only 'false' skips later steps.
33+
if: github.event_name != 'workflow_dispatch'
3234
with:
35+
token: ''
3336
predicate-quantifier: 'every'
34-
filters: |
35-
changed:
36-
- "!**/*.md"
37-
- "!**/*.mdx"
38-
- "!**/_meta.json"
39-
- "!**/_nav.json"
40-
- "!**/dictionary.txt"
37+
filters: .github/filters.yml
4138

4239
- name: Setup Node.js
43-
if: steps.changes.outputs.changed == 'true'
40+
if: steps.changes.outputs.changed != 'false'
4441
uses: actions/setup-node@949feb2413d6458794dcd2491c4babbbce0c15c1 # v7
4542
with:
4643
node-version: 24.22.2
4744
package-manager-cache: false
4845

4946
- name: Install Pnpm
50-
if: steps.changes.outputs.changed == 'true'
47+
if: steps.changes.outputs.changed != 'false'
5148
uses: pnpm/action-setup@ea17c68df8912ef543352723c149a84f56e3d413 # v6.1.0
5249
with:
5350
run_install: true
5451

5552
- name: Build Packages
56-
if: steps.changes.outputs.changed == 'true'
53+
if: steps.changes.outputs.changed != 'false'
5754
run: node --run build
5855

5956
- name: Run Rust Tests
60-
if: steps.changes.outputs.changed == 'true'
57+
if: steps.changes.outputs.changed != 'false'
6158
run: cargo test --profile ci --workspace --locked
6259

6360
- name: Build Native Binding
64-
if: steps.changes.outputs.changed == 'true'
61+
if: steps.changes.outputs.changed != 'false'
6562
run: pnpm --filter rstack build:native:ci
6663

6764
- name: Check Generated Native Files
68-
if: steps.changes.outputs.changed == 'true'
65+
if: steps.changes.outputs.changed != 'false'
6966
run: git diff --exit-code -- packages/rstack/binding.cjs packages/rstack/binding.d.cts
7067

7168
- name: Run Test
72-
if: steps.changes.outputs.changed == 'true' && runner.os != 'Windows'
69+
if: steps.changes.outputs.changed != 'false' && runner.os != 'Windows'
7370
run: node --run test
7471

7572
# Run package tests serially on Windows to avoid resource contention between nested test workers.
7673
- name: Run Test (Windows)
77-
if: steps.changes.outputs.changed == 'true' && runner.os == 'Windows'
74+
if: steps.changes.outputs.changed != 'false' && runner.os == 'Windows'
7875
run: pnpm --workspace-concurrency=1 --filter "./packages/**" test

0 commit comments

Comments
 (0)