Skip to content

Commit a149ea9

Browse files
committed
ci: add a check to ensure the pipeline is up to date
If someone pushes code changes and the pipeline.yaml has not been updated accordingly, the CI will fail and ask to update it and push again. Also, you can now generate a pipeline with `make pipeline`. Signed-off-by: Sébastien Han <[email protected]>
1 parent 3717a4d commit a149ea9

File tree

2 files changed

+10
-1
lines changed

2 files changed

+10
-1
lines changed

.github/workflows/pre_commit.yaml

+6
Original file line numberDiff line numberDiff line change
@@ -34,3 +34,9 @@ jobs:
3434
- name: Run pre-commit
3535
run: |
3636
pre-commit run --all-files
37+
38+
- name: Test if pipeline is up-to-date
39+
run: |
40+
pip install click kfp==2.9.0 kfp.kubernetes
41+
make pipeline
42+
git diff --exit-code || (echo "Pipeline is not up-to-date. Please run 'make pipeline' and commit the changes." && exit 1)

Makefile

+4-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
1-
.PHONY: standalone
1+
.PHONY: standalone pipeline
22

33
standalone:
44
python3 pipeline.py gen-standalone
55
ruff format standalone/standalone.py
6+
7+
pipeline:
8+
python3 pipeline.py

0 commit comments

Comments
 (0)