-
Notifications
You must be signed in to change notification settings - Fork 399
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(codecov): increase codecov upload attempt (#1186)
multiple workflows were failing randomly with `Unable to locate build via Github Actions API` error like: - https://github.com/gnolang/gno/actions/runs/6349517658/job/17247838334?pr=1179 - https://github.com/gnolang/gno/actions/runs/6378366330/job/17308780300?pr=1117 - ... based on this [issue#3954](https://community.codecov.com/t/upload-issues-unable-to-locate-build-via-github-actions-api/3954) from `community.codecov.com` adding `codecov upload token` should resolve most issues. However, in some rare instances where API limits are still reached, a re-upload attempt should be made. This PR introduces a retry action to allow codecov to reattempt the upload if it fails the first time. --------- Signed-off-by: gfanton <[email protected]>
- Loading branch information
Showing
3 changed files
with
44 additions
and
20 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -74,14 +74,22 @@ jobs: | |
export GOPATH=$HOME/go | ||
export GOTEST_FLAGS="-v -p 1 -timeout=30m -coverprofile=coverage.out -covermode=atomic" | ||
make ${{ matrix.args }} | ||
# NOTE: Using retry action to manage occasional upload failures to codecov.io, due to API limits. | ||
# Refer to issue#3954: https://community.codecov.com/t/upload-issues-unable-to-locate-build-via-github-actions-api/3954 | ||
- if: ${{ runner.os == 'Linux' && matrix.goversion == '1.21.x' }} | ||
uses: codecov/codecov-action@v3 | ||
name: Upload coverage to Codecov.io | ||
uses: Wandalen/[email protected] | ||
with: | ||
token: ${{ secrets.CODECOV_TOKEN }} | ||
name: gno.land | ||
flags: gno.land-${{matrix.args}} | ||
files: ./gno.land/coverage.out | ||
fail_ci_if_error: ${{ github.repository == 'gnolang/gno' }} | ||
attempt_limit: 3 | ||
attempt_delay: 30000 | ||
action: codecov/codecov-action@v3 | ||
with: | | ||
token: ${{ secrets.CODECOV_TOKEN }} | ||
name: gno.land | ||
flags: gno.land-${{matrix.args}} | ||
files: ./gno.land/coverage.out | ||
fail_ci_if_error: ${{ github.repository == 'gnolang/gno' }} | ||
docker-integration: | ||
strategy: | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -78,12 +78,20 @@ jobs: | |
export GOPATH=$HOME/go | ||
export GOTEST_FLAGS="-v -p 1 -timeout=30m -coverprofile=coverage.out -covermode=atomic" | ||
make ${{ matrix.args }} | ||
# NOTE: Using retry action to manage occasional upload failures to codecov.io, due to API limits. | ||
# Refer to issue#3954: https://community.codecov.com/t/upload-issues-unable-to-locate-build-via-github-actions-api/3954 | ||
- if: ${{ runner.os == 'Linux' && matrix.goversion == '1.21.x' }} | ||
uses: codecov/codecov-action@v3 | ||
name: Upload coverage to Codecov.io | ||
uses: Wandalen/[email protected] | ||
with: | ||
token: ${{ secrets.CODECOV_TOKEN }} | ||
name: gnovm | ||
verbose: true | ||
flags: gnovm-${{matrix.args}} | ||
files: ./gnovm/coverage.out | ||
fail_ci_if_error: ${{ github.repository == 'gnolang/gno' }} | ||
attempt_limit: 3 | ||
attempt_delay: 30000 | ||
action: codecov/codecov-action@v3 | ||
with: | | ||
token: ${{ secrets.CODECOV_TOKEN }} | ||
name: gnovm | ||
verbose: true | ||
flags: gnovm-${{matrix.args}} | ||
files: ./gnovm/coverage.out | ||
fail_ci_if_error: ${{ github.repository == 'gnolang/gno' }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -68,12 +68,20 @@ jobs: | |
export GOTEST_FLAGS="-v -p 1 -timeout=30m -coverprofile=coverage.out -covermode=atomic" | ||
make ${{ matrix.args }} | ||
touch coverage.out | ||
# NOTE: Using retry action to manage occasional upload failures to codecov.io, due to API limits. | ||
# Refer to issue#3954: https://community.codecov.com/t/upload-issues-unable-to-locate-build-via-github-actions-api/3954 | ||
- if: ${{ runner.os == 'Linux' && matrix.goversion == '1.21.x' }} | ||
uses: codecov/codecov-action@v3 | ||
name: Upload coverage to Codecov.io | ||
uses: Wandalen/[email protected] | ||
with: | ||
token: ${{ secrets.CODECOV_TOKEN }} | ||
name: tm2 | ||
verbose: true | ||
flags: tm2-${{matrix.args}} | ||
files: ./tm2/coverage.out | ||
fail_ci_if_error: ${{ github.repository == 'gnolang/gno' }} | ||
attempt_limit: 3 | ||
attempt_delay: 30000 | ||
action: codecov/codecov-action@v3 | ||
with: | | ||
token: ${{ secrets.CODECOV_TOKEN }} | ||
name: tm2 | ||
verbose: true | ||
flags: tm2-${{matrix.args}} | ||
files: ./tm2/coverage.out | ||
fail_ci_if_error: ${{ github.repository == 'gnolang/gno' }} |