Skip to content

Commit 3e5eafd

Browse files
committed
.
1 parent a524eba commit 3e5eafd

File tree

1 file changed

+23
-0
lines changed

1 file changed

+23
-0
lines changed

.github/workflows/test.yml

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

0 commit comments

Comments
 (0)