Skip to content

Commit 092be13

Browse files
authored
[ISSUE #1148]Update codecov Github actions CI (#1149)
1 parent 76a730a commit 092be13

File tree

1 file changed

+20
-15
lines changed

1 file changed

+20
-15
lines changed

.github/workflows/codecov.yml

Lines changed: 20 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,7 @@ env:
1111

1212
jobs:
1313
build:
14-
1514
runs-on: ubuntu-latest
16-
1715
steps:
1816
- uses: actions/checkout@v4
1917
- uses: actions-rs/toolchain@v1
@@ -26,16 +24,23 @@ jobs:
2624
run: cargo test --verbose
2725
env:
2826
CARGO_INCREMENTAL: '0'
29-
RUSTFLAGS: '-Zprofile -Ccodegen-units=1 -Cinline-threshold=0 -Clink-dead-code -Coverflow-checks=off'
30-
RUSTDOCFLAGS: '-Zprofile -Ccodegen-units=1 -Cinline-threshold=0 -Clink-dead-code -Coverflow-checks=off'
31-
- name: rust-grcov
32-
# You may pin to the exact commit or the version.
33-
# uses: actions-rs/grcov@bb47b1ed7883a1502fa6875d562727ace2511248
34-
uses: actions-rs/[email protected]
35-
- name: Upload coverage reports to Codecov
36-
uses: codecov/[email protected]
37-
env:
38-
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
39-
with:
40-
fail_ci_if_error: true
41-
verbose: true
27+
RUSTFLAGS: '-Ccodegen-units=1 -Cllvm-args=--inline-threshold=0 -Clink-dead-code -Coverflow-checks=off'
28+
RUSTDOCFLAGS: '-Ccodegen-units=1 -Cllvm-args=--inline-threshold=0 -Clink-dead-code -Coverflow-checks=off'
29+
test:
30+
runs-on: ubuntu-latest
31+
env:
32+
CARGO_TERM_COLOR: always
33+
steps:
34+
- uses: actions/checkout@v4
35+
- name: Install Rust
36+
run: rustup update stable
37+
- name: Install cargo-llvm-cov
38+
uses: taiki-e/install-action@cargo-llvm-cov
39+
- name: Generate code coverage
40+
run: cargo llvm-cov --all-features --workspace --lcov --output-path lcov.info
41+
- name: Upload coverage to Codecov
42+
uses: codecov/[email protected]
43+
with:
44+
token: ${{ secrets.CODECOV_TOKEN }} # not required for public repos
45+
files: lcov.info
46+
fail_ci_if_error: false

0 commit comments

Comments
 (0)