Skip to content

Commit d3ae30a

Browse files
check test report exist before uploading them
1 parent 5260177 commit d3ae30a

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

.github/workflows/ci-build.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ jobs:
4444
CI_ARGS: "--batch-mode"
4545
SKIP_UNSTABLE_TESTS: 1
4646
- name: Upload test results to Codecov
47-
if: ${{ !cancelled() }}
47+
if: ${{ !cancelled() && hashFiles('**/target/surefire-reports/TEST-*.xml') != '' }}
4848
uses: codecov/codecov-action@671740ac38dd9b0130fbe1cec585b89eea48d3de # v5.5.2
4949
with:
5050
directory: .
@@ -54,7 +54,7 @@ jobs:
5454
report_type: test_results
5555
token: ${{ secrets.CODECOV_TOKEN }}
5656
- name: Upload coverage to Codecov
57-
if: ${{ !cancelled() && startsWith(matrix.java-version, '14') }}
57+
if: ${{ !cancelled() && startsWith(matrix.java-version, '14') && hashFiles('**/target/site/jacoco/jacoco.xml') != '' }}
5858
uses: codecov/codecov-action@671740ac38dd9b0130fbe1cec585b89eea48d3de # v5.5.2
5959
with:
6060
files: "**/target/site/jacoco/jacoco.xml"

0 commit comments

Comments
 (0)