Adds a second test stage

develop
Josh Cooper 2022-11-11 19:01:10 -08:00
parent cd7fe8a213
commit d03f93c0d7
1 changed files with 12 additions and 11 deletions

@ -96,19 +96,20 @@ jobs:
run: | run: |
ninja -C build-ci install ninja -C build-ci install
ccache --show-stats ccache --show-stats
- name: Run tests - name: Run unit tests
id: run_tests id: run_tests1
run: |
exit build-ci/library/tests/test-library
- name: Run lua tests
id: run_tests2
run: | run: |
export TERM=dumb export TERM=dumb
if build-ci/library/tests/test-library; then status=0
status=0 script -qe -c "python ci/run-tests.py --headless --keep-status \"$DF_FOLDER\"" || status=$((status + 1))
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))
python ci/check-rpc.py "$DF_FOLDER/dfhack-rpc.txt" || status=$((status + 2)) mkdir -p artifacts
mkdir -p artifacts cp "$DF_FOLDER"/test*.json "$DF_FOLDER"/*.log artifacts || status=$((status + 4))
cp "$DF_FOLDER"/test*.json "$DF_FOLDER"/*.log artifacts || status=$((status + 4)) exit $status
exit $status
fi
exit 1
- name: Upload test artifacts - name: Upload test artifacts
uses: actions/upload-artifact@v1 uses: actions/upload-artifact@v1
if: (success() || failure()) && steps.run_tests.outcome != 'skipped' if: (success() || failure()) && steps.run_tests.outcome != 'skipped'