Skip to content

Commit 731aec5

Browse files
authored
[CI/Build] Limit github CI jobs based on files changed (#9928)
Signed-off-by: Russell Bryant <[email protected]>
1 parent 09d3550 commit 731aec5

File tree

5 files changed

+45
-5
lines changed

5 files changed

+45
-5
lines changed

.github/workflows/actionlint.yml

+2
Original file line numberDiff line numberDiff line change
@@ -6,12 +6,14 @@ on:
66
paths:
77
- '.github/workflows/*.ya?ml'
88
- '.github/workflows/actionlint.*'
9+
- '.github/workflows/matchers/actionlint.json'
910
pull_request:
1011
branches:
1112
- "main"
1213
paths:
1314
- '.github/workflows/*.ya?ml'
1415
- '.github/workflows/actionlint.*'
16+
- '.github/workflows/matchers/actionlint.json'
1517

1618
env:
1719
LC_ALL: en_US.UTF-8

.github/workflows/clang-format.yml

+12
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,21 @@ on:
66
push:
77
branches:
88
- main
9+
paths:
10+
- '**/*.h'
11+
- '**/*.cpp'
12+
- '**/*.cu'
13+
- '**/*.cuh'
14+
- '.github/workflows/clang-format.yml'
915
pull_request:
1016
branches:
1117
- main
18+
paths:
19+
- '**/*.h'
20+
- '**/*.cpp'
21+
- '**/*.cu'
22+
- '**/*.cuh'
23+
- '.github/workflows/clang-format.yml'
1224

1325
jobs:
1426
clang-format:

.github/workflows/mypy.yaml

+10
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,19 @@ on:
66
push:
77
branches:
88
- main
9+
paths:
10+
- '**/*.py'
11+
- '.github/workflows/mypy.yaml'
12+
- 'tools/mypy.sh'
13+
- 'pyproject.toml'
914
pull_request:
1015
branches:
1116
- main
17+
paths:
18+
- '**/*.py'
19+
- '.github/workflows/mypy.yaml'
20+
- 'tools/mypy.sh'
21+
- 'pyproject.toml'
1222

1323
jobs:
1424
mypy:

.github/workflows/ruff.yml

+13-4
Original file line numberDiff line numberDiff line change
@@ -6,16 +6,28 @@ on:
66
push:
77
branches:
88
- main
9+
paths:
10+
- "**/*.py"
11+
- pyproject.toml
12+
- requirements-lint.txt
13+
- .github/workflows/matchers/ruff.json
14+
- .github/workflows/ruff.yml
915
pull_request:
1016
branches:
1117
- main
18+
paths:
19+
- "**/*.py"
20+
- pyproject.toml
21+
- requirements-lint.txt
22+
- .github/workflows/matchers/ruff.json
23+
- .github/workflows/ruff.yml
1224

1325
jobs:
1426
ruff:
1527
runs-on: ubuntu-latest
1628
strategy:
1729
matrix:
18-
python-version: ["3.8", "3.9", "3.10", "3.11", "3.12"]
30+
python-version: ["3.12"]
1931
steps:
2032
- uses: actions/checkout@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871 # v4.2.1
2133
- name: Set up Python ${{ matrix.python-version }}
@@ -30,9 +42,6 @@ jobs:
3042
run: |
3143
echo "::add-matcher::.github/workflows/matchers/ruff.json"
3244
ruff check --output-format github .
33-
- name: Spelling check with codespell
34-
run: |
35-
codespell --toml pyproject.toml
3645
- name: Run isort
3746
run: |
3847
isort . --check-only

.github/workflows/yapf.yml

+8-1
Original file line numberDiff line numberDiff line change
@@ -6,15 +6,22 @@ on:
66
push:
77
branches:
88
- main
9+
paths:
10+
- "**/*.py"
11+
- .github/workflows/yapf.yml
912
pull_request:
1013
branches:
1114
- main
15+
paths:
16+
- "**/*.py"
17+
- .github/workflows/yapf.yml
18+
1219
jobs:
1320
yapf:
1421
runs-on: ubuntu-latest
1522
strategy:
1623
matrix:
17-
python-version: ["3.8", "3.9", "3.10", "3.11", "3.12"]
24+
python-version: ["3.12"]
1825
steps:
1926
- uses: actions/checkout@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871 # v4.2.1
2027
- name: Set up Python ${{ matrix.python-version }}

0 commit comments

Comments
 (0)