-
Notifications
You must be signed in to change notification settings - Fork 175
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add workflow to publish test results
- Loading branch information
Showing
1 changed file
with
56 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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" |