Skip to content

Commit d9c656b

Browse files
committed
ci: update coverage job
1 parent 06e9134 commit d9c656b

1 file changed

Lines changed: 20 additions & 12 deletions

File tree

.github/workflows/ci.yml

Lines changed: 20 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -76,21 +76,29 @@ jobs:
7676
runs-on: ubuntu-latest
7777
steps:
7878
- uses: actions/checkout@v2
79+
- uses: actions/cache@v2
80+
with:
81+
path: |
82+
~/.cargo/registry
83+
~/.cargo/git
84+
target
85+
key: coverage-cargo-${{ hashFiles('**/Cargo.toml') }}
86+
continue-on-error: true
87+
- name: install cargo-llvm-cov
88+
run: |
89+
wget https://github.com/taiki-e/cargo-llvm-cov/releases/download/v${CARGO_LLVM_COV_VERSION}/cargo-llvm-cov-x86_64-unknown-linux-gnu.tar.gz -qO- | tar -xzvf -
90+
mv cargo-llvm-cov ~/.cargo/bin
91+
env:
92+
CARGO_LLVM_COV_VERSION: 0.1.9
7993
- uses: actions-rs/toolchain@v1
8094
with:
8195
toolchain: nightly
8296
override: true
8397
profile: minimal
84-
- uses: actions-rs/cargo@v1
85-
with:
86-
command: test
87-
args: --no-fail-fast
88-
env:
89-
CARGO_INCREMENTAL: 0
90-
RUSTFLAGS: "-Zprofile -Ccodegen-units=1 -Cinline-threshold=0 -Clink-dead-code -Coverflow-checks=off -Cpanic=abort -Zpanic_abort_tests"
91-
RUSTDOCFLAGS: "-Zprofile -Ccodegen-units=1 -Cinline-threshold=0 -Clink-dead-code -Coverflow-checks=off -Cpanic=abort -Zpanic_abort_tests"
92-
- uses: actions-rs/grcov@v0.1
93-
id: coverage
94-
- uses: codecov/codecov-action@v1
98+
components: llvm-tools-preview
99+
- run: |
100+
cargo llvm-cov clean
101+
cargo llvm-cov --lcov --output-path coverage.lcov
102+
- uses: codecov/codecov-action@v2
95103
with:
96-
file: ${{ steps.coverage.outputs.report }}
104+
file: coverage.lcov

0 commit comments

Comments
 (0)