From c9536ab350f25c73dbcd8ce0559af21c82a142ee Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A1s=20B=20Nagy?= <20251272+BNAndras@users.noreply.github.com> Date: Mon, 20 Oct 2025 23:04:31 -0700 Subject: [PATCH] Make CI compatible for Unitt 3.x (#207) * Ignore auto-generated .unitt folders * Update `acronym` to unitt 3 * Only show detailed output for failing CI tests * Revert "Update `acronym` to unitt 3" This reverts commit c4972099e3133ed623cbf8c2131310a07fb5f29c. --- .gitignore | 1 + bin/verify-exercises | 16 +++++++++++++--- 2 files changed, 14 insertions(+), 3 deletions(-) diff --git a/.gitignore b/.gitignore index 6a513a0..f558c0a 100644 --- a/.gitignore +++ b/.gitignore @@ -2,3 +2,4 @@ .DS_Store bin/configlet bin/configlet.exe +exercises/**/.unitt/ diff --git a/bin/verify-exercises b/bin/verify-exercises index f1e4fc7..c0fbb09 100755 --- a/bin/verify-exercises +++ b/bin/verify-exercises @@ -22,7 +22,7 @@ required_tool() { required_tool jq required_tool arturo -copy_example_or_examplar_to_solution() { +copy_example_or_exemplar_to_solution() { jq -c '[.files.solution, .files.exemplar // .files.example] | transpose | map({src: .[1], dst: .[0]}) | .[]' .meta/config.json \ | while read -r src_and_dst; do cp "$(jq -r '.src' <<< "${src_and_dst}")" "$(jq -r '.dst' <<< "${src_and_dst}")" @@ -36,7 +36,17 @@ unskip_tests() { } run_tests() { - arturo tester.art + set +e + test_output=$(arturo tester.art 2>&1) + result=$? + set -e + if [[ $result -eq 0 ]]; then + echo "All tests passed!" + return 0 + else + echo "${test_output}" + return 1 + fi } verify_exercise() { @@ -55,7 +65,7 @@ verify_exercise() { cp -r "${dir}/." "${tmp_dir}" cd "${tmp_dir}" - copy_example_or_examplar_to_solution + copy_example_or_exemplar_to_solution unskip_tests run_tests )