From 101f2d4a134b9c43f11de1653f8ab02574dca312 Mon Sep 17 00:00:00 2001 From: Tom French <15848336+TomAFrench@users.noreply.github.com> Date: Wed, 8 Jan 2025 17:50:13 +0000 Subject: [PATCH] chore(ci): fail properly in `external-repo-checks` (#6988) --- ...ures.jsonl => aztec-nr.failures.jsonl.does_not_compile} | 0 ...sonl => noir-contracts.failures.jsonl.does_not_compile} | 0 .../critical_libraries_status/noir-lang/ec/.actual.jsonl | 4 ---- .../noir-lang/ec/.actual.jsonl.jq | 1 - .../.failures.jsonl.does_not_compile} | 0 .../.failures.jsonl.does_not_compile} | 0 .../.failures.jsonl.does_not_compile} | 0 .../noir-lang/sparse_array/.failures.jsonl | 0 .../.failures.jsonl.does_not_compile} | 0 .github/scripts/check_test_results.sh | 3 ++- .github/workflows/test-js-packages.yml | 7 ++++++- 11 files changed, 8 insertions(+), 7 deletions(-) rename .github/critical_libraries_status/AztecProtocol/aztec-packages/noir-projects/{aztec-nr.failures.jsonl => aztec-nr.failures.jsonl.does_not_compile} (100%) rename .github/critical_libraries_status/AztecProtocol/aztec-packages/noir-projects/{noir-contracts.failures.jsonl => noir-contracts.failures.jsonl.does_not_compile} (100%) delete mode 100644 .github/critical_libraries_status/noir-lang/ec/.actual.jsonl delete mode 100644 .github/critical_libraries_status/noir-lang/ec/.actual.jsonl.jq rename .github/critical_libraries_status/noir-lang/{ec/.failures.jsonl.jq => noir_bigcurve/.failures.jsonl.does_not_compile} (100%) rename .github/critical_libraries_status/noir-lang/{noir_bigcurve/.failures.jsonl => noir_json_parser/.failures.jsonl.does_not_compile} (100%) rename .github/critical_libraries_status/noir-lang/{noir_json_parser/.failures.jsonl => noir_rsa/.failures.jsonl.does_not_compile} (100%) delete mode 100644 .github/critical_libraries_status/noir-lang/sparse_array/.failures.jsonl rename .github/critical_libraries_status/noir-lang/{noir_rsa/.failures.jsonl => sparse_array/.failures.jsonl.does_not_compile} (100%) diff --git a/.github/critical_libraries_status/AztecProtocol/aztec-packages/noir-projects/aztec-nr.failures.jsonl b/.github/critical_libraries_status/AztecProtocol/aztec-packages/noir-projects/aztec-nr.failures.jsonl.does_not_compile similarity index 100% rename from .github/critical_libraries_status/AztecProtocol/aztec-packages/noir-projects/aztec-nr.failures.jsonl rename to .github/critical_libraries_status/AztecProtocol/aztec-packages/noir-projects/aztec-nr.failures.jsonl.does_not_compile diff --git a/.github/critical_libraries_status/AztecProtocol/aztec-packages/noir-projects/noir-contracts.failures.jsonl b/.github/critical_libraries_status/AztecProtocol/aztec-packages/noir-projects/noir-contracts.failures.jsonl.does_not_compile similarity index 100% rename from .github/critical_libraries_status/AztecProtocol/aztec-packages/noir-projects/noir-contracts.failures.jsonl rename to .github/critical_libraries_status/AztecProtocol/aztec-packages/noir-projects/noir-contracts.failures.jsonl.does_not_compile diff --git a/.github/critical_libraries_status/noir-lang/ec/.actual.jsonl b/.github/critical_libraries_status/noir-lang/ec/.actual.jsonl deleted file mode 100644 index cb56f792778..00000000000 --- a/.github/critical_libraries_status/noir-lang/ec/.actual.jsonl +++ /dev/null @@ -1,4 +0,0 @@ -{"event":"started","name":"one","test_count":1,"type":"suite"} -{"event":"started","name":"foo","suite":"one","type":"test"} -{"event":"failed","exec_time":0.05356625,"name":"foo","suite":"one","type":"test"} -{"event":"ok","failed":0,"ignored":0,"passed":1,"type":"suite"} \ No newline at end of file diff --git a/.github/critical_libraries_status/noir-lang/ec/.actual.jsonl.jq b/.github/critical_libraries_status/noir-lang/ec/.actual.jsonl.jq deleted file mode 100644 index 1123e7e68e4..00000000000 --- a/.github/critical_libraries_status/noir-lang/ec/.actual.jsonl.jq +++ /dev/null @@ -1 +0,0 @@ -{"suite":"one","name":"foo"} diff --git a/.github/critical_libraries_status/noir-lang/ec/.failures.jsonl.jq b/.github/critical_libraries_status/noir-lang/noir_bigcurve/.failures.jsonl.does_not_compile similarity index 100% rename from .github/critical_libraries_status/noir-lang/ec/.failures.jsonl.jq rename to .github/critical_libraries_status/noir-lang/noir_bigcurve/.failures.jsonl.does_not_compile diff --git a/.github/critical_libraries_status/noir-lang/noir_bigcurve/.failures.jsonl b/.github/critical_libraries_status/noir-lang/noir_json_parser/.failures.jsonl.does_not_compile similarity index 100% rename from .github/critical_libraries_status/noir-lang/noir_bigcurve/.failures.jsonl rename to .github/critical_libraries_status/noir-lang/noir_json_parser/.failures.jsonl.does_not_compile diff --git a/.github/critical_libraries_status/noir-lang/noir_json_parser/.failures.jsonl b/.github/critical_libraries_status/noir-lang/noir_rsa/.failures.jsonl.does_not_compile similarity index 100% rename from .github/critical_libraries_status/noir-lang/noir_json_parser/.failures.jsonl rename to .github/critical_libraries_status/noir-lang/noir_rsa/.failures.jsonl.does_not_compile diff --git a/.github/critical_libraries_status/noir-lang/sparse_array/.failures.jsonl b/.github/critical_libraries_status/noir-lang/sparse_array/.failures.jsonl deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/.github/critical_libraries_status/noir-lang/noir_rsa/.failures.jsonl b/.github/critical_libraries_status/noir-lang/sparse_array/.failures.jsonl.does_not_compile similarity index 100% rename from .github/critical_libraries_status/noir-lang/noir_rsa/.failures.jsonl rename to .github/critical_libraries_status/noir-lang/sparse_array/.failures.jsonl.does_not_compile diff --git a/.github/scripts/check_test_results.sh b/.github/scripts/check_test_results.sh index c844c025876..25833387990 100755 --- a/.github/scripts/check_test_results.sh +++ b/.github/scripts/check_test_results.sh @@ -17,6 +17,7 @@ if [ -f $1 ] && [ -f $2 ]; then echo "Error: test failures don't match expected failures" echo "Lines prefixed with '>' are new test failures (you could add them to '$1')" echo "Lines prefixed with '<' are tests that were expected to fail but passed (you could remove them from '$1')" + exit -1 fi elif [ -f $1 ]; then # Only the expected file exists, which means the actual test couldn't be compiled. @@ -35,4 +36,4 @@ else # Both files don't exists, which means we are expecting the external library not # to compile, and it didn't, so all is good. exit 0 -fi \ No newline at end of file +fi diff --git a/.github/workflows/test-js-packages.yml b/.github/workflows/test-js-packages.yml index 5222b667c2a..3fabf8ce39a 100644 --- a/.github/workflows/test-js-packages.yml +++ b/.github/workflows/test-js-packages.yml @@ -597,7 +597,12 @@ jobs: - name: Run nargo test working-directory: ./test-repo/${{ matrix.project.path }} run: | - nargo test --silence-warnings --skip-brillig-constraints-check --format json ${{ matrix.project.nargo_args }} | tee ${{ github.workspace }}/noir-repo/.github/critical_libraries_status/${{ matrix.project.repo }}/${{ matrix.project.path }}.actual.jsonl + output_file=${{ github.workspace }}/noir-repo/.github/critical_libraries_status/${{ matrix.project.repo }}/${{ matrix.project.path }}.actual.jsonl + nargo test --silence-warnings --skip-brillig-constraints-check --format json ${{ matrix.project.nargo_args }} | tee $output_file + if [ ! -s $output_file ]; then + # The file is empty so we delete it to signal that `nargo test` failed before it could run any tests + rm -f $output_file + fi env: NARGO_IGNORE_TEST_FAILURES_FROM_FOREIGN_CALLS: true