Skip to content

Commit

Permalink
Add workflow to publish test results
Browse files Browse the repository at this point in the history
  • Loading branch information
wahln committed Apr 22, 2024
1 parent c5265ea commit 372e09f
Showing 1 changed file with 56 additions and 0 deletions.
56 changes: 56 additions & 0 deletions .github/workflows/test-results.yml
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"

0 comments on commit 372e09f

Please sign in to comment.