diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 6e260b3d..28c9c0e2 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -43,3 +43,20 @@ jobs: with: recreate: true path: code-coverage-results.md + - name: Upload Test Results + if: always() + uses: actions/upload-artifact@v3 + with: + name: Test Results + path: | + ./temp/testresults/test-results.xml + + event_file: + name: "Event File" + runs-on: ubuntu-latest + steps: + - name: Upload + uses: actions/upload-artifact@v3 + with: + name: Event File + path: ${{ github.event_path }} \ No newline at end of file diff --git a/.github/workflows/test_reports.yml b/.github/workflows/test_reports.yml new file mode 100644 index 00000000..c62bd61a --- /dev/null +++ b/.github/workflows/test_reports.yml @@ -0,0 +1,31 @@ +name: Test Reports + +on: + workflow_run: + workflows: ["CI"] + types: + - completed +permissions: {} + +jobs: + test_reports: + name: Test Reports + runs-on: ubuntu-latest + if: github.event.workflow_run.conclusion != 'skipped' + permissions: + checks: write + pull-requests: write + actions: read + steps: + - name: Download and Extract Artifacts + uses: dawidd6/action-download-artifact@246dbf436b23d7c49e21a7ab8204ca9ecd1fe615 + with: + run_id: ${{ github.event.workflow_run.id }} + path: artifacts + - name: Publish Test Results + uses: EnricoMi/publish-unit-test-result-action@v2 + with: + commit: ${{ github.event.workflow_run.head_sha }} + event_file: artifacts/Event File/event.json + event_name: ${{ github.event.workflow_run.event }} + files: "artifacts/**/*.xml"