Skip to content

Commit 5d8bdab

Browse files
authored
Merge pull request #67 from monarch-initiative/improve-ci-validation
Improve CI validation with path-based filtering
2 parents 877a3e9 + 76822dc commit 5d8bdab

File tree

1 file changed

+25
-1
lines changed

1 file changed

+25
-1
lines changed

.github/workflows/main.yaml

Lines changed: 25 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ jobs:
1919
runs-on: ubuntu-latest
2020
strategy:
2121
matrix:
22-
python-version: ["3.11", "3.12", "3.13"]
22+
python-version: ["3.13"]
2323
fail-fast: false
2424

2525
steps:
@@ -30,6 +30,20 @@ jobs:
3030
with:
3131
persist-credentials: false
3232

33+
- name: Check for changes
34+
uses: dorny/paths-filter@v3
35+
id: changes
36+
with:
37+
list-files: shell
38+
filters: |
39+
src:
40+
- 'src/**'
41+
- 'tests/**'
42+
- 'pyproject.toml'
43+
- 'uv.lock'
44+
kb:
45+
- 'kb/**/*.yaml'
46+
3347
# https://github.com/astral-sh/setup-uv
3448
- name: Install uv
3549
uses: astral-sh/setup-uv@v6.4.3
@@ -51,5 +65,15 @@ jobs:
5165
- name: Install project
5266
run: uv sync --dev
5367

68+
- name: Validate changed KB files
69+
if: steps.changes.outputs.kb == 'true'
70+
run: |
71+
echo "Validating changed KB files..."
72+
for f in ${{ steps.changes.outputs.kb_files }}; do
73+
echo "=== Validating: $f ==="
74+
just validate "$f"
75+
done
76+
5477
- name: Run test suite
78+
if: steps.changes.outputs.src == 'true'
5579
run: just test

0 commit comments

Comments
 (0)