From 9dba246d961650572ba218eea767a26ff7bce33c Mon Sep 17 00:00:00 2001 From: Tom French Date: Wed, 15 Jan 2025 00:11:16 +0000 Subject: [PATCH 1/2] chore: add end step for formatting workflow --- .github/workflows/formatting.yml | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) diff --git a/.github/workflows/formatting.yml b/.github/workflows/formatting.yml index b132ba6f938..4e836ef2493 100644 --- a/.github/workflows/formatting.yml +++ b/.github/workflows/formatting.yml @@ -143,3 +143,29 @@ jobs: - name: Format test suite working-directory: ./test_programs run: ./format.sh check + + # This is a job which depends on all test jobs and reports the overall status. + # This allows us to add/remove test jobs without having to update the required workflows. + formatting-end: + name: Formatting End + runs-on: ubuntu-22.04 + # We want this job to always run (even if the dependant jobs fail) as we want this job to fail rather than skipping. + if: ${{ always() }} + needs: + - clippy + - rustfmt + - eslint + - nargo_fmt + + steps: + - name: Report overall success + run: | + if [[ $FAIL == true ]]; then + exit 1 + else + exit 0 + fi + env: + # We treat any skipped or failing jobs as a failure for the workflow as a whole. + FAIL: ${{ contains(needs.*.result, 'failure') || contains(needs.*.result, 'cancelled') || contains(needs.*.result, 'skipped') }} + From 13cad8af3c3e8425eb3285724a4172edbe16d3b8 Mon Sep 17 00:00:00 2001 From: Tom French Date: Wed, 15 Jan 2025 00:16:20 +0000 Subject: [PATCH 2/2] . --- .../comptime_struct_definition/src/main.nr | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test_programs/compile_success_empty/comptime_struct_definition/src/main.nr b/test_programs/compile_success_empty/comptime_struct_definition/src/main.nr index 75d48c6f1dd..0b71d44f016 100644 --- a/test_programs/compile_success_empty/comptime_struct_definition/src/main.nr +++ b/test_programs/compile_success_empty/comptime_struct_definition/src/main.nr @@ -54,7 +54,7 @@ fn main() { let (field1_name, field1_type) = fields[0]; let (field2_name, field2_type) = fields[1]; - + assert_eq(field1_name, quote { field1 }); assert_eq(field2_name, quote { field2 });