Skip to content

Commit b38cfd2

Browse files
committed
ci: scope workflow triggers to relevant paths
- codeflash-optimize.yaml: replace paths: ['**'] wildcard with targeted filters - mypy.yml: add path filters (was firing on every PR/push including docs) - prek.yaml: add path filters (was firing on every PR) - unit-tests.yaml: add path filters (was firing on every PR/push) Docs-only, README, experiment, and LICENSE changes no longer trigger these workflows. Saves ~20 workflow runs per docs-only PR.
1 parent 5684168 commit b38cfd2

4 files changed

Lines changed: 44 additions & 2 deletions

File tree

.github/workflows/codeflash-optimize.yaml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,11 @@ name: CodeFlash
33
on:
44
pull_request:
55
paths:
6-
- '**' # Trigger for all paths
6+
- 'codeflash/**'
7+
- 'tests/**'
8+
- 'pyproject.toml'
9+
- 'uv.lock'
10+
- '.github/workflows/codeflash-optimize.yaml'
711

812
workflow_dispatch:
913

.github/workflows/mypy.yml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,19 @@ on:
44
push:
55
branches:
66
- main
7+
paths:
8+
- 'codeflash/**'
9+
- 'pyproject.toml'
10+
- 'uv.lock'
11+
- 'mypy_allowlist.txt'
12+
- '.github/workflows/mypy.yml'
713
pull_request:
14+
paths:
15+
- 'codeflash/**'
16+
- 'pyproject.toml'
17+
- 'uv.lock'
18+
- 'mypy_allowlist.txt'
19+
- '.github/workflows/mypy.yml'
820

921
concurrency:
1022
group: ${{ github.workflow }}-${{ github.ref_name }}

.github/workflows/prek.yaml

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,13 @@
11
name: Lint
2-
on: [pull_request]
2+
on:
3+
pull_request:
4+
paths:
5+
- 'codeflash/**'
6+
- 'tests/**'
7+
- 'packages/**'
8+
- 'pyproject.toml'
9+
- 'uv.lock'
10+
- '.github/workflows/prek.yaml'
311

412
concurrency:
513
group: ${{ github.workflow }}-${{ github.ref_name }}

.github/workflows/unit-tests.yaml

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,25 @@ name: unit-tests
33
on:
44
push:
55
branches: [main]
6+
paths:
7+
- 'codeflash/**'
8+
- 'codeflash-benchmark/**'
9+
- 'codeflash-java-runtime/**'
10+
- 'tests/**'
11+
- 'packages/**'
12+
- 'pyproject.toml'
13+
- 'uv.lock'
14+
- '.github/workflows/unit-tests.yaml'
615
pull_request:
16+
paths:
17+
- 'codeflash/**'
18+
- 'codeflash-benchmark/**'
19+
- 'codeflash-java-runtime/**'
20+
- 'tests/**'
21+
- 'packages/**'
22+
- 'pyproject.toml'
23+
- 'uv.lock'
24+
- '.github/workflows/unit-tests.yaml'
725
workflow_dispatch:
826

927
concurrency:

0 commit comments

Comments
 (0)