Skip to content

Commit

Permalink
ci: Improve display of test results using JUnit XML
Browse files Browse the repository at this point in the history
  • Loading branch information
Holzhaus committed Aug 30, 2023
1 parent ffc617f commit 5e036de
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 1 deletion.
9 changes: 8 additions & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -321,7 +321,7 @@ jobs:

- name: "Test"
if: matrix.crosscompile != true
run: ctest --timeout 45 ${{ matrix.ctest_args }}
run: ctest --timeout 45 --output-junit junit.xml ${{ matrix.ctest_args }}
working-directory: build
env:
# Render analyzer waveform tests to an offscreen buffer
Expand All @@ -331,6 +331,13 @@ jobs:
CTEST_PARALLEL_LEVEL: 1
CTEST_OUTPUT_ON_FAILURE: 1

- name: "Upload Test Results"
if: always() && matrix.crosscompile != true
uses: actions/upload-artifact@v3
with:
name: test-results-${{ matrix.name}}
path: build/junit.xml

- name: Benchmark
if: matrix.crosscompile != true
run: cmake --build . --target mixxx-benchmark --config RelWithDebInfo
Expand Down
16 changes: 16 additions & 0 deletions .github/workflows/test-report.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
name: "Test Report"
on:
workflow_run:
workflows: ["Build"]
types:
- completed
jobs:
report:
runs-on: ubuntu-latest
steps:
- uses: Holzhaus/test-reporter@24330a4449e7cfced86756379f6bbec75cc05a5a
with:
artifact: /test-results-(.*)/
name: "Test Report for $1"
path: "*.xml"
reporter: ctest-junit

0 comments on commit 5e036de

Please sign in to comment.