Skip to content

Commit 08795f2

Browse files
committed
Switch to codecov CLI
codecov recommends using the new CLI uploader rather than their (deprecated) bash uploader (which we use). It also appears to have a fail-on-error mode which we'd prefer over the bash one which silently swallows errors.
1 parent 4e3d54e commit 08795f2

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

.github/workflows/build.yml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -125,18 +125,20 @@ jobs:
125125
cargo install cargo-llvm-cov
126126
export RUSTFLAGS="-Coverflow-checks=off"
127127
cargo llvm-cov --features rest-client,rpc-client,tokio,serde --codecov --hide-instantiations --output-path=target/codecov.json
128+
curl --verbose -O https://cli.codecov.io/latest/linux/codecov
129+
chmod +x codecov
128130
# Could you use this to fake the coverage report for your PR? Sure.
129131
# Will anyone be impressed by your amazing coverage? No
130132
# Maybe if codecov wasn't broken we wouldn't need to do this...
131-
bash <(curl -s https://codecov.io/bash) -f target/codecov.json -t "f421b687-4dc2-4387-ac3d-dc3b2528af57"
133+
./codecov --verbose upload-process --disable-search --fail-on-error -f target/codecov.json -t "f421b687-4dc2-4387-ac3d-dc3b2528af57"
132134
cargo clean
133135
- name: Run fuzz coverage generation
134136
run: |
135137
./contrib/generate_fuzz_coverage.sh --output-dir `pwd` --output-codecov-json
136138
# Could you use this to fake the coverage report for your PR? Sure.
137139
# Will anyone be impressed by your amazing coverage? No
138140
# Maybe if codecov wasn't broken we wouldn't need to do this...
139-
bash <(curl -s https://codecov.io/bash) -f fuzz-codecov.json -t "f421b687-4dc2-4387-ac3d-dc3b2528af57"
141+
./codecov --verbose upload-process --disable-search --fail-on-error -f fuzz-codecov.json -t "f421b687-4dc2-4387-ac3d-dc3b2528af57"
140142
141143
benchmark:
142144
runs-on: ubuntu-latest

0 commit comments

Comments
 (0)