Skip to content

Commit

Permalink
Add JUnit reporter
Browse files Browse the repository at this point in the history
Signed-off-by: Cristian Le <[email protected]>
  • Loading branch information
LecrisUT committed Dec 14, 2023
1 parent 23eba0d commit 83846f7
Show file tree
Hide file tree
Showing 3 changed files with 39 additions and 2 deletions.
3 changes: 3 additions & 0 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,9 @@ jobs:
tests:
needs: [ pre-commit ]
uses: ./.github/workflows/step_test.yaml
permissions:
contents: read
checks: write

docs:
needs: [ pre-commit ]
Expand Down
3 changes: 3 additions & 0 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,9 @@ jobs:
tests:
needs: [ pre-commit ]
uses: ./.github/workflows/step_test.yaml
permissions:
contents: read
checks: write
docs:
needs: [ pre-commit ]
uses: ./.github/workflows/step_docs.yaml
Expand Down
35 changes: 33 additions & 2 deletions .github/workflows/step_test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ jobs:
python-version: 3.x
# TODO: This will be migrated to standalone actions
- name: Setup tmt environment
run: dnf install -y tmt
run: dnf install -y tmt tmt+report-junit
- uses: lukka/get-cmake@latest
with:
cmakeVersion: ${{ matrix.cmake }}
Expand All @@ -42,4 +42,35 @@ jobs:
# TODO: This will be migrated to standalone actions
- name: Run tmt tests
run: >
tmt --root ./test run --all provision -h local
tmt --root ./test run --all provision -h local report -h junit --file report-cmake-${{ matrix.cmake }}.xml
- name: Upload Test Results
if: always()
uses: actions/upload-artifact@v4
with:
name: JUnit CMake ${{ matrix.cmake }}
path: report-*.xml
report:
permissions:
contents: read
checks: write
name: Report JUnit
runs-on: ubuntu-latest
steps:
- name: Download test results
uses: actions/download-artifact@v4
- name: Publish Test Report
uses: mikepenz/action-junit-report@v4
with:
check_name: CMake Tests (mikepenz)
report_paths: report-*.xml
- name: Test Report
uses: dorny/test-reporter@v1
with:
name: CMake Tests (dorny)
path: report-*.xml
reporter: java-junit
- name: Publish Test Results
uses: EnricoMi/publish-unit-test-result-action@v2
with:
check_name: CMake Tests (EnricoMi)
files: report-*.xml

0 comments on commit 83846f7

Please sign in to comment.