diff --git a/.github/workflows/test_report.yml b/.github/workflows/test_report.yml index 93cdb86687261..060a8795b6a77 100644 --- a/.github/workflows/test_report.yml +++ b/.github/workflows/test_report.yml @@ -15,7 +15,16 @@ jobs: github_token: ${{ secrets.GITHUB_TOKEN }} workflow: ${{ github.event.workflow_run.workflow_id }} commit: ${{ github.event.workflow_run.head_commit.id }} + - name: Check if JUnit report XML files exist + run: | + if ls **/target/test-reports/*.xml > /dev/null 2>&1; then + echo '::set-output name=FILE_EXISTS::true' + else + echo '::set-output name=FILE_EXISTS::false' + fi + id: check-junit-file - name: Publish test report + if: steps.check-junit-file.outputs.FILE_EXISTS == 'true' uses: scacap/action-surefire-report@v1 with: check_name: Report test results