Skip to content

Commit

Permalink
ci: add a check to ensure the pipeline is up to date
Browse files Browse the repository at this point in the history
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]>
  • Loading branch information
leseb committed Oct 9, 2024
1 parent 7d8d314 commit 6852064
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
6 changes: 6 additions & 0 deletions .github/workflows/pre_commit.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -34,3 +34,9 @@ jobs:
- name: Run pre-commit
run: |
pre-commit run --all-files
- name: Test if pipeline is up-to-date
run: |
pip install click kfp==2.9.0 kfp.kubernetes
make pipeline
git diff --exit-code || (echo "Pipeline is not up-to-date. Please run 'make pipeline' and commit the changes." && exit 1)
5 changes: 4 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
.PHONY: standalone
.PHONY: standalone pipeline

standalone:
python3 pipeline.py gen-standalone
ruff format standalone/standalone.py

pipeline:
python3 pipeline.py

0 comments on commit 6852064

Please sign in to comment.