diff --git a/.github/workflows/test-results.yml b/.github/workflows/test-results.yml new file mode 100644 index 000000000..e09af4fe2 --- /dev/null +++ b/.github/workflows/test-results.yml @@ -0,0 +1,56 @@ +name: Test Results + +permissions: + checks: write + pull-requests: write + + on: + workflow_run: + workflows: ["Tests"] + types: + - completed + + jobs: + download_and_report: + runs-on: ubuntu-latest + + steps: + + # Step to download artifact from a previous workflow run 1 + - name: Download Artifact 1 + uses: actions/download-artifact@v3 + with: + name: Test Results (Matlab R2022b) # Replace with your actual artifact name + path: test-results/artifact1 + + # Step to download artifact from a previous workflow run 2 + - name: Download Artifact 2 + uses: actions/download-artifact@v3 + with: + name: Test Results (Matlab latest) # Replace with your actual artifact name + path: test-results/artifact2 + + # Step to download artifact from a previous workflow run 3 + - name: Download Artifact 3 + uses: actions/download-artifact@v3 + with: + name: Test Results (Octave) # Replace with your actual artifact name + path: test-results/artifact3 + + # Step to use an action to report the test results on GitHub + - name: Report Test Results + uses: some-org/some-test-report-action@v1 # Replace with your specific action + with: + result-files: | + test-results/artifact1/testresults.xml + test-results/artifact2/testresults.xml + test-results/artifact3/testresults.xml + # other required inputs for the action + + + - name: Publish Test Results + uses: EnricoMi/publish-unit-test-result-action@v2 + with: + files: | + test-results/*/*.xml + check_name: "Test Results" \ No newline at end of file