Skip to content

Commit

Permalink
add(751): add publish test result action
Browse files Browse the repository at this point in the history
  • Loading branch information
indiVar0508 committed Jul 4, 2023
1 parent ff03a49 commit f1fdfb9
Show file tree
Hide file tree
Showing 2 changed files with 48 additions and 0 deletions.
17 changes: 17 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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 }}
31 changes: 31 additions & 0 deletions .github/workflows/test_reports.yml
Original file line number Diff line number Diff line change
@@ -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' && github.event.event_name== 'pull_request' }}
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"

0 comments on commit f1fdfb9

Please sign in to comment.