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 e739532 commit 2b8b371
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
5 changes: 5 additions & 0 deletions .github/workflows/pre_commit.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -34,3 +34,8 @@ jobs:
- name: Run pre-commit
run: |
pre-commit run --all-files
- name: Test if pipeline is up-to-date
run: |
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 2b8b371

Please sign in to comment.