Skip to content

Commit d1317e7

Browse files
committed
CI: Update code coverage to use Codecov action
- update checkout to v6 - update rust toolchain to use official action - replace coveralls with codecov
1 parent 46e1ab7 commit d1317e7

1 file changed

Lines changed: 12 additions & 13 deletions

File tree

.github/workflows/code_coverage.yml

Lines changed: 12 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -13,32 +13,31 @@ jobs:
1313

1414
steps:
1515
- name: Checkout
16-
uses: actions/checkout@v4
16+
uses: actions/checkout@v6
1717
with:
1818
persist-credentials: false
1919
- name: Install lcov tools
2020
run: sudo apt-get install lcov -y
2121
- name: Install Rust toolchain
22-
uses: actions-rs/toolchain@v1
22+
uses: actions-rust-lang/setup-rust-toolchain@v1
2323
with:
2424
toolchain: stable
25-
override: true
26-
profile: minimal
2725
components: llvm-tools-preview
28-
- name: Rust Cache
29-
uses: Swatinem/rust-cache@v2.7.8
3026
- name: Install grcov
31-
run: if [[ ! -e ~/.cargo/bin/grcov ]]; then cargo install grcov; fi
27+
run: command -v grcov || cargo install grcov
3228
- name: Test
3329
run: cargo test --all-features
34-
- name: Make coverage directory
35-
run: mkdir coverage
3630
- name: Run grcov
37-
run: grcov . --binary-path ./target/debug/ -s . -t lcov --branch --ignore-not-existing --keep-only 'src/**' --ignore 'tests/**' -o ./coverage/lcov.info
31+
run: |
32+
mkdir -p coverage
33+
grcov . --binary-path ./target/debug/ -s . -t lcov --branch --ignore-not-existing --keep-only 'src/**' --ignore 'tests/**' -o ./coverage/lcov.info
3834
- name: Check lcov.info
3935
run: cat ./coverage/lcov.info
40-
- name: Coveralls
41-
uses: coverallsapp/github-action@v2
36+
- name: Upload to Codecov
37+
uses: codecov/codecov-action@v5
4238
with:
4339
github-token: ${{ secrets.GITHUB_TOKEN }}
44-
file: ./coverage/lcov.info
40+
files: ./coverage/lcov.info
41+
fail_ci_if_error: false
42+
flags: rust
43+

0 commit comments

Comments
 (0)