Skip to content

Commit 2b8b371

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 e739532 commit 2b8b371

File tree

2 files changed

+9
-1
lines changed

2 files changed

+9
-1
lines changed

.github/workflows/pre_commit.yaml

+5
Original file line numberDiff line numberDiff line change
@@ -34,3 +34,8 @@ 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+
make pipeline
41+
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)