Skip to content

Commit d0336f0

Browse files
authored
use github action for uploading codecov (#5571)
We were getting intermittent issues using the original codecov upload process, which has been deprecated for a few years now. The coverage also has been broken for some unknown amount of time. Using the github action is the officially recommended way to upload to codecov now.
1 parent 1c66573 commit d0336f0

File tree

3 files changed

+14
-6
lines changed

3 files changed

+14
-6
lines changed

.github/workflows/ci.yml

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,12 @@ jobs:
7474
7575
- name: Upload coverage
7676
if: github.repository == 'iron-fish/ironfish'
77-
run: CODECOV_TOKEN=${{ secrets.CODECOV_TOKEN }} ROOT_PATH=$GITHUB_WORKSPACE/ yarn coverage:upload
77+
uses: codecov/codecov-action@v4
78+
with:
79+
fail_ci_if_error: true
80+
token: ${{ secrets.CODECOV_TOKEN }}
81+
flags: ironfish
82+
7883

7984
testslow:
8085
name: Slow Tests
@@ -111,4 +116,8 @@ jobs:
111116
112117
- name: Upload coverage
113118
if: github.repository == 'iron-fish/ironfish'
114-
run: CODECOV_TOKEN=${{ secrets.CODECOV_TOKEN }} ROOT_PATH=$GITHUB_WORKSPACE/ yarn coverage:upload
119+
uses: codecov/codecov-action@v4
120+
with:
121+
fail_ci_if_error: true
122+
token: ${{ secrets.CODECOV_TOKEN }}
123+
flags: ironfish

.github/workflows/rust_ci.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,7 @@ jobs:
105105
106106
# Upload code coverage to Codecov
107107
- name: Upload to codecov.io
108-
uses: codecov/codecov-action@v3
108+
uses: codecov/codecov-action@v4
109109
with:
110110
token: ${{secrets.CODECOV_TOKEN}}
111111
flags: ironfish-rust
@@ -131,7 +131,7 @@ jobs:
131131
132132
# Upload code coverage to Codecov
133133
- name: Upload to codecov.io
134-
uses: codecov/codecov-action@v3
134+
uses: codecov/codecov-action@v4
135135
with:
136136
token: ${{secrets.CODECOV_TOKEN}}
137137
flags: ironfish-zkp

package.json

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,8 +32,7 @@
3232
"test:slow:coverage": "lerna run test:slow --stream -- --testPathIgnorePatterns --collect-coverage",
3333
"test:perf:report": "lerna run test:perf:report",
3434
"typecheck": "lerna exec -- tsc --noEmit",
35-
"typecheck:changed": "lerna exec --since origin/master --include-dependents -- tsc --noEmit",
36-
"coverage:upload": "lerna exec '\"yarn codecov -t $CODECOV_TOKEN -f ./coverage/clover.xml -F $LERNA_PACKAGE_NAME -p $ROOT_PATH/ --disable=gcov\"'"
35+
"typecheck:changed": "lerna exec --since origin/master --include-dependents -- tsc --noEmit"
3736
},
3837
"devDependencies": {
3938
"@typescript-eslint/eslint-plugin": "6.19.0",

0 commit comments

Comments
 (0)