Upload test artifacts even if tests fail

develop
lethosor 2021-09-17 15:28:36 -04:00
parent 413917e9c6
commit 01077fab0e
No known key found for this signature in database
GPG Key ID: 76A269552F4F58C1
1 changed files with 5 additions and 3 deletions

@ -83,11 +83,13 @@ jobs:
id: run_tests
run: |
export TERM=dumb
status=0
mv "$DF_FOLDER"/dfhack.init-example "$DF_FOLDER"/dfhack.init
script -qe -c "python ci/run-tests.py --headless --keep-status \"$DF_FOLDER\""
python ci/check-rpc.py "$DF_FOLDER/dfhack-rpc.txt"
script -qe -c "python ci/run-tests.py --headless --keep-status \"$DF_FOLDER\"" || status=$((status + 1))
python ci/check-rpc.py "$DF_FOLDER/dfhack-rpc.txt" || status=$((status + 2))
mkdir -p artifacts
cp "$DF_FOLDER/test_status.json" "$DF_FOLDER"/*.log artifacts
cp "$DF_FOLDER/test_status.json" "$DF_FOLDER"/*.log artifacts || status=$((status + 4))
exit $status
- name: Upload test artifacts
uses: actions/upload-artifact@v1
if: (success() || failure()) && steps.run_tests.outcome != 'skipped'