Skip to content

Commit 5c5030c

Browse files
authored
chore(ci): add "Noir End" step to ease noir version bumps (#17)
1 parent bc70943 commit 5c5030c

File tree

1 file changed

+23
-0
lines changed

1 file changed

+23
-0
lines changed

.github/workflows/test.yml

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,3 +42,26 @@ jobs:
4242

4343
- name: Run formatter
4444
run: nargo fmt --check
45+
46+
# This is a job which depends on all test jobs and reports the overall status.
47+
# This allows us to add/remove test jobs without having to update the required workflows.
48+
tests-end:
49+
name: Noir End
50+
runs-on: ubuntu-latest
51+
# We want this job to always run (even if the dependant jobs fail) as we want this job to fail rather than skipping.
52+
if: ${{ always() }}
53+
needs:
54+
- test
55+
- format
56+
57+
steps:
58+
- name: Report overall success
59+
run: |
60+
if [[ $FAIL == true ]]; then
61+
exit 1
62+
else
63+
exit 0
64+
fi
65+
env:
66+
# We treat any cancelled, skipped or failing jobs as a failure for the workflow as a whole.
67+
FAIL: ${{ contains(needs.*.result, 'failure') || contains(needs.*.result, 'cancelled') || contains(needs.*.result, 'skipped') }}

0 commit comments

Comments
 (0)