Skip to content

Commit

Permalink
Retry code coverage upload on failure
Browse files Browse the repository at this point in the history
Noticed in several results of
https://github.com/opensearch-project/security/actions/runs/5978371801/job/16220344142?pr=3123
that the code coverage upload had failed silently, and the annotations
make it look like many tests were not executed.  Since in this job there
were 9 failures at the same time, adding retry mechanism as well to
prevent blind restarting of workflows.

Signed-off-by: Peter Nied <[email protected]>
  • Loading branch information
peternied committed Aug 25, 2023
1 parent ed61646 commit ea73034
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -60,10 +60,15 @@ jobs:
${{ matrix.gradle_task }} -Dbuild.snapshot=false
- name: Coverage
uses: codecov/codecov-action@v3
uses: Wandalen/wretry.action@v1.3.0
with:
token: ${{ secrets.CODECOV_TOKEN }}
files: ./build/reports/jacoco/test/jacocoTestReport.xml
attempt_limit: 3
attempt_delay: 2000
action: codecov/codecov-action@v3
with: |
token: ${{ secrets.CODECOV_TOKEN }}
fail_ci_if_error: true
files: ./build/reports/jacoco/test/jacocoTestReport.xml
- uses: actions/upload-artifact@v3
if: always()
Expand Down

0 comments on commit ea73034

Please sign in to comment.