Skip to content

Commit

Permalink
Update gh action to publish report.
Browse files Browse the repository at this point in the history
  • Loading branch information
driessamyn committed Nov 7, 2024
1 parent c06b65e commit ea3e977
Showing 1 changed file with 32 additions and 7 deletions.
39 changes: 32 additions & 7 deletions .github/workflows/build-and-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,11 +28,36 @@ jobs:
- name: Run tests
run: ./gradlew check

- name: Run ktlint
run: ./gradlew ktlintCheck

- name: Publish Test Report
uses: mikepenz/action-junit-report@v5
if: success() || failure() # always run even if the previous step fails
- name: Upload Test Report
uses: actions/upload-artifact@v3
if: always() # always run even if the previous step fails
with:
report_paths: '**/build/test-results/*/TEST-*.xml'
name: junit-test-results
path: '**/build/test-results/*/TEST-*.xml'
retention-days: 1
---
name: report
on:
workflow_run:
workflows: [ build ]
types: [ completed ]

permissions:
checks: write

jobs:
checks:
runs-on: ubuntu-latest
steps:
- name: Download Test Report
uses: dawidd6/action-download-artifact@v2
with:
name: junit-test-results
workflow: ${{ github.event.workflow.id }}
run_id: ${{ github.event.workflow_run.id }}
- name: Publish Test Report
uses: mikepenz/action-junit-report@v5
with:
commit: ${{github.event.workflow_run.head_sha}}
report_paths: '**/build/test-results/*/TEST-*.xml'

0 comments on commit ea3e977

Please sign in to comment.