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.
This commit is contained in:
1
.gitignore
vendored
1
.gitignore
vendored
@@ -2,3 +2,4 @@
|
||||
.DS_Store
|
||||
bin/configlet
|
||||
bin/configlet.exe
|
||||
exercises/**/.unitt/
|
||||
|
||||
@@ -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
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user