diff --git a/.github/workflows/build-and-test.yml b/.github/workflows/build-and-test.yml index 659344c..7fa5cfe 100644 --- a/.github/workflows/build-and-test.yml +++ b/.github/workflows/build-and-test.yml @@ -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' +