Skip to content

Commit 4249935

Browse files
ci: add path filters (#1871)
1 parent f29ca18 commit 4249935

6 files changed

Lines changed: 78 additions & 0 deletions

File tree

.github/workflows/ci-bun.yml

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,23 @@ name: Tests (Bun)
33
on:
44
workflow_dispatch:
55
pull_request:
6+
paths: &paths # All package sources (knip lints across the monorepo and analyzes the repo itself)
7+
- 'packages/**'
8+
- '!packages/docs/**/*.md'
9+
- '!packages/docs/**/*.mdx'
10+
# Root workspace / dependency / lint / knip-on-self config
11+
- 'package.json'
12+
- 'pnpm-lock.yaml'
13+
- 'pnpm-workspace.yaml'
14+
- '.oxlintrc.json'
15+
- '.oxfmtrc.json'
16+
- 'knip.json'
17+
# This workflow file
18+
- '.github/workflows/ci-bun.yml'
619
push:
720
branches:
821
- '**'
22+
paths: *paths
923

1024
# Automatically cancel in-progress actions on the same branch
1125
concurrency:

.github/workflows/ci-legacy-5.0.4.yml

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,23 @@ name: Tests (against typescript@5.0.4 in Node.js v20)
55
on:
66
workflow_dispatch:
77
pull_request:
8+
paths: &paths # All package sources (knip lints across the monorepo and analyzes the repo itself)
9+
- 'packages/**'
10+
- '!packages/docs/**/*.md'
11+
- '!packages/docs/**/*.mdx'
12+
# Root workspace / dependency / lint / knip-on-self config
13+
- 'package.json'
14+
- 'pnpm-lock.yaml'
15+
- 'pnpm-workspace.yaml'
16+
- '.oxlintrc.json'
17+
- '.oxfmtrc.json'
18+
- 'knip.json'
19+
# This workflow file
20+
- '.github/workflows/ci-legacy-5.0.4.yml'
821
push:
922
branches:
1023
- '**'
24+
paths: *paths
1125

1226
# Automatically cancel in-progress actions on the same branch
1327
concurrency:

.github/workflows/ci-legacy-latest.yml

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,23 @@ name: Tests (against typescript@latest in Node.js v22)
55
on:
66
workflow_dispatch:
77
pull_request:
8+
paths: &paths # All package sources (knip lints across the monorepo and analyzes the repo itself)
9+
- 'packages/**'
10+
- '!packages/docs/**/*.md'
11+
- '!packages/docs/**/*.mdx'
12+
# Root workspace / dependency / lint / knip-on-self config
13+
- 'package.json'
14+
- 'pnpm-lock.yaml'
15+
- 'pnpm-workspace.yaml'
16+
- '.oxlintrc.json'
17+
- '.oxfmtrc.json'
18+
- 'knip.json'
19+
# This workflow file
20+
- '.github/workflows/ci-legacy-latest.yml'
821
push:
922
branches:
1023
- '**'
24+
paths: *paths
1125

1226
# Automatically cancel in-progress actions on the same branch
1327
concurrency:

.github/workflows/ci.yml

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,23 @@ name: Tests (against typescript@next in Node.js v24)
33
on:
44
workflow_dispatch:
55
pull_request:
6+
paths: &paths # All package sources (knip lints across the monorepo and analyzes the repo itself)
7+
- 'packages/**'
8+
- '!packages/docs/**/*.md'
9+
- '!packages/docs/**/*.mdx'
10+
# Root workspace / dependency / lint / knip-on-self config
11+
- 'package.json'
12+
- 'pnpm-lock.yaml'
13+
- 'pnpm-workspace.yaml'
14+
- '.oxlintrc.json'
15+
- '.oxfmtrc.json'
16+
- 'knip.json'
17+
# This workflow file
18+
- '.github/workflows/ci.yml'
619
push:
720
branches:
821
- '**'
22+
paths: *paths
923

1024
# Automatically cancel in-progress actions on the same branch
1125
concurrency:

.github/workflows/integration.yml

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,24 @@ on:
88
type: boolean
99
default: false
1010
pull_request:
11+
paths: &paths # Sources of the three packages published to pkg.pr.new
12+
- 'packages/knip/**'
13+
- '!packages/knip/test/**'
14+
- '!packages/knip/fixtures/**'
15+
- 'packages/language-server/**'
16+
- 'packages/mcp-server/**'
17+
# Root workspace / dependency config
18+
- 'package.json'
19+
- 'pnpm-lock.yaml'
20+
- 'pnpm-workspace.yaml'
21+
# This workflow and its support files
22+
- '.github/workflows/integration.yml'
23+
- '.github/workflows/scripts/**'
24+
- '.github/workflows/snapshots/**'
1125
push:
1226
branches:
1327
- '**'
28+
paths: *paths
1429

1530
# Automatically cancel in-progress actions on the same branch
1631
concurrency:

.github/workflows/markdown-link-check.yml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,13 @@ on:
44
push:
55
branches:
66
- '**'
7+
paths:
8+
# Any markdown across the monorepo
9+
- '**/*.md'
10+
- '**/*.mdx'
11+
# This workflow and its config
12+
- '.github/workflows/markdown-link-check.yml'
13+
- '.github/workflows/markdown-link-check.json'
714

815
# Automatically cancel in-progress actions on the same branch
916
concurrency:

0 commit comments

Comments
 (0)