@@ -25,29 +25,19 @@ jobs:
25
25
- name : Rust Toolchain
26
26
uses : dtolnay/rust-toolchain@master
27
27
with :
28
- # Coverage requires the nightly toolchain because it uses the presently unstable `-Z profile` feature
29
- # See: https://github.com/rust-lang/rust/issues/42524
30
- # See also: https://github.com/actions-rs/grcov#usage
31
- # nightly can be very volatile--pin this to a version we know works well...
32
- toolchain : nightly-2023-03-09
28
+ toolchain : stable
29
+ # We need this component to generate source coverage in stable
30
+ components : llvm-tools-preview
31
+ - name : Cargo Install
32
+ run : cargo install cargo-llvm-cov
33
33
# Conformance tests are run with 'conformance_test' feature. Since step runs with 'all-features', the conformance
34
34
# test are also run, which can cause `cargo test` to fail. Add 'continue-on-error' step to prevent GH Actions
35
35
# failure.
36
- - name : Cargo Test
36
+ - name : Cargo Test w/ Coverage
37
37
continue-on-error : true
38
- run : cargo test --verbose --workspace --all-features --no-fail-fast -- -Z unstable-options --ensure-time
39
- env :
40
- CARGO_INCREMENTAL : ' 0'
41
- # https://github.com/marketplace/actions/rust-grcov
42
- # For some reason the panic=abort modes don't work for build script...
43
- # RUSTFLAGS: '-Zprofile -Ccodegen-units=1 -Cinline-threshold=0 -Clink-dead-code -Coverflow-checks=off -Cpanic=abort -Zpanic_abort_tests'
44
- # RUSTDOCFLAGS: '-Zprofile -Ccodegen-units=1 -Cinline-threshold=0 -Clink-dead-code -Coverflow-checks=off -Cpanic=abort -Zpanic_abort_tests'
45
- RUSTFLAGS : ' -Zprofile -Ccodegen-units=1 -Cinline-threshold=0 -Clink-dead-code -Coverflow-checks=off'
46
- RUSTDOCFLAGS : ' -Zprofile -Ccodegen-units=1 -Cinline-threshold=0 -Clink-dead-code -Coverflow-checks=off'
47
- - id : coverage
48
- name : Code Coverage
49
- uses :
actions-rs/[email protected]
38
+ run : cargo llvm-cov --verbose --workspace --all-features --ignore-run-fail --codecov --output-path codecov.json
50
39
- name : Codecov Upload
51
- uses : codecov/codecov-action@v1
40
+ uses : codecov/codecov-action@v3
52
41
with :
53
- files : ${{ steps.coverage.outputs.report }}
42
+ files : codecov.json
43
+ fail_ci_if_error : true
0 commit comments