Skip to content

Commit

Permalink
Add test artifacts upload step and action
Browse files Browse the repository at this point in the history
  • Loading branch information
Eggbertx committed Mar 3, 2024
1 parent ac00b9a commit 90f6fde
Show file tree
Hide file tree
Showing 3 changed files with 27 additions and 2 deletions.
3 changes: 1 addition & 2 deletions .github/actions/publish-test-report/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,14 +12,13 @@ inputs:
runs:
using: composite
steps:

- name: 'Fixing the dubious git 128 error'
shell: bash
run: |
git config --global --add safe.directory '*'
- name: 'Publish Test Results'
uses: dorny/test-reporter@v1.6.0
uses: dorny/test-reporter@v1.8.0
with:
name: test_report_${{ inputs.report-name }}
path: ${{ inputs.report-path }}
Expand Down
20 changes: 20 additions & 0 deletions .github/actions/upload-test-results/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
name: upload-test-report
description: "Uploads the unit test reports"

inputs:
report-name:
description: "Name of the report to be upload."
required: true

runs:
using: composite
steps:
- name: Collect Test Artifacts
uses: actions/upload-artifact@v3
with:
name: test_report_${{ inputs.report-name }}
path: |
reports/**
./build/Testing/Temporary/*.log
/var/lib/systemd/coredump/**
/var/log/syslog
6 changes: 6 additions & 0 deletions .github/workflows/cmake-ctest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -51,3 +51,9 @@ jobs:
with:
report-name: oc8
report-path: build/test-report.xml

- name: "Upload Unit Test Reports"
if: ${{ !cancelled() }}
uses: ./.github/actions/upload-test-report
with:
report-name: ${{ env.REPORT_NAME }}

0 comments on commit 90f6fde

Please sign in to comment.