1111 runs-on : ubuntu-latest
1212 env :
1313 CARGO_TERM_COLOR : always
14+ CARGO_INCREMENTAL : 0
1415 steps :
1516 - name : Free Disk Space
1617 uses : jlumbroso/free-disk-space@54081f138730dfa15788a46383842cd2f914a1be # v1.3.1
@@ -25,19 +26,31 @@ jobs:
2526 - uses : actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # 4.2.2
2627 - name : Install Rust
2728 run : rustup install nightly-2024-12-16 && rustup default nightly-2024-12-16
29+ - name : Cache
30+ uses : Swatinem/rust-cache@f13886b937689c021905a6b90929199931d60db1 # 2.8.1
31+ with :
32+ cache-targets : true # cache build artifacts
33+ cache-bin : true # cache the ~/.cargo/bin directory
2834 - name : Install cargo-llvm-cov
2935 uses : taiki-e/install-action@2c41309d51ede152b6f2ee6bf3b71e6dc9a8b7df # 2.49.27
3036 with :
3137 tool : cargo-llvm-cov@0.6.13,nextest@0.9.96
3238 - name : Generate code coverage (including doc tests)
3339 run : |
34- cargo llvm-cov --all-features --workspace --no-report nextest
40+ cargo llvm-cov --all-features --workspace --no-report nextest --exclude bin_tests
3541 cargo llvm-cov --all-features --workspace --no-report --doc
3642 cargo llvm-cov report --doctests --lcov --output-path lcov.info
37- cargo clean
43+ - name : Generate Codecov components configuration
44+ run : |
45+ cat .codecov_header.yml >| .codecov.yml
46+ find . -name Cargo.toml | cut -c 3- | grep -v "^Cargo.toml\$" | xargs -n 1 dirname | grep -v / | grep -v "^bin_tests$"| sort | \
47+ while read -r name; do echo -e " - component-id: ${name}\n name: ${name}\n paths:\n - ${name}/**" >> .codecov.yml ; done
48+ echo "----- .codecov.yml -----"
49+ cat .codecov.yml
3850 - name : Upload coverage to Codecov
39- uses : codecov/codecov-action@b9fd7d16f6d7d1b5d2bec1a2887e65ceed900238 # 4.6.0
51+ uses : codecov/codecov-action@5a1091511ad55cbe89839c7260b706298ca349f7 # 5.5.1
52+ env :
53+ CODECOV_TOKEN : ${{ secrets.CODECOV_TOKEN }}
4054 with :
41- token : ${{ secrets.CODECOV_TOKEN }}
4255 files : lcov.info
4356 fail_ci_if_error : true
0 commit comments