Add test summary to each job (#19824)

This commit is contained in:
Matthias Moninger 2023-04-05 11:17:33 +03:00 committed by GitHub
parent 1dafb8e56e
commit 4248cf3038
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 17 additions and 1 deletions

View File

@ -103,6 +103,11 @@ jobs:
- name: Run Tests
if: matrix.platform != 'arm64'
run: . scripts/setenv -q && run-tests
- name: Test Summary
uses: test-summary/action@v2
with:
paths: "artifacts/test-**.xml"
if: matrix.platform != 'arm64'
- name: Upload artifacts (openrct2.org)
run: |
. scripts/setenv
@ -185,6 +190,11 @@ jobs:
- name: Run Tests
if: ${{matrix.run_tests}}
run: . scripts/setenv -q && run-tests
- name: Test Summary
uses: test-summary/action@v2
with:
paths: "artifacts/test-**.xml"
if: ${{matrix.run_tests}}
- name: Build artifacts
run: |
. scripts/setenv
@ -299,6 +309,7 @@ jobs:
if-no-files-found: error
- name: Run Tests
run: . scripts/setenv -q && run-tests
- name: Upload artifacts (openrct2.org)
run: |
# Build identification code: https://github.com/Limetric/OpenRCT2.org/blob/e5b738f3dadcc5a3b78e8dfd434756ff31eaa1d3/src/misc/releaseAsset.js#L94-L116
@ -400,6 +411,11 @@ jobs:
run: . scripts/setenv && build -DCMAKE_C_COMPILER=clang -DCMAKE_CXX_COMPILER=clang++ -DCMAKE_BUILD_TYPE=Debug -DCMAKE_CXX_FLAGS="-fprofile-instr-generate -fcoverage-mapping" -DWITH_TESTS=on
- name: Run Tests
run: . scripts/setenv -q && LLVM_PROFILE_FILE="openrct2-coverage-%p.profraw" run-tests
- name: Test Summary
uses: test-summary/action@v2
with:
paths: "artifacts/test-**.xml"
if: always()
- name: Process coverage information
run: |
cd bin

View File

@ -20,5 +20,5 @@ if [[ "$OSTYPE" == "cygwin" || "$OSTYPE" == "msys" ]]; then
./tests --gtest_output=xml:../artifacts/test-results.xml "$@"
else
echo -e "\033[0;36mRunning OpenRCT2 tests...\033[0m"
ctest --output-on-failure "$@"
ctest --output-on-failure --output-junit ../artifacts/test-results.xml "$@"
fi