From a675935153a95adc0c07da5614a57cf5a1c3f628 Mon Sep 17 00:00:00 2001 From: Vihiga Tyonum Date: Mon, 9 Mar 2026 23:02:07 +0100 Subject: [PATCH] CI: Update code coverage to use Codecov action - update checkout to v6 - update rust toolchain to use official action - replace coveralls with codecov --- .github/workflows/code_coverage.yml | 27 ++++++++++++--------------- 1 file changed, 12 insertions(+), 15 deletions(-) diff --git a/.github/workflows/code_coverage.yml b/.github/workflows/code_coverage.yml index df3d3e95..013d43e9 100644 --- a/.github/workflows/code_coverage.yml +++ b/.github/workflows/code_coverage.yml @@ -13,32 +13,29 @@ jobs: steps: - name: Checkout - uses: actions/checkout@v4 + uses: actions/checkout@v6 with: persist-credentials: false - - name: Install lcov tools - run: sudo apt-get install lcov -y - name: Install Rust toolchain - uses: actions-rs/toolchain@v1 + uses: actions-rust-lang/setup-rust-toolchain@v1 with: toolchain: stable - override: true - profile: minimal components: llvm-tools-preview - - name: Rust Cache - uses: Swatinem/rust-cache@v2.7.8 - name: Install grcov - run: if [[ ! -e ~/.cargo/bin/grcov ]]; then cargo install grcov; fi + run: command -v grcov || cargo install grcov - name: Test run: cargo test --all-features - - name: Make coverage directory - run: mkdir coverage - name: Run grcov - run: grcov . --binary-path ./target/debug/ -s . -t lcov --branch --ignore-not-existing --keep-only 'src/**' --ignore 'tests/**' -o ./coverage/lcov.info + run: | + mkdir -p coverage + grcov . --binary-path ./target/debug/ -s . -t lcov --branch --ignore-not-existing --keep-only 'src/**' --ignore 'tests/**' -o ./coverage/lcov.info - name: Check lcov.info run: cat ./coverage/lcov.info - - name: Coveralls - uses: coverallsapp/github-action@v2 + - name: Upload to Codecov + uses: codecov/codecov-action@v5 with: github-token: ${{ secrets.GITHUB_TOKEN }} - file: ./coverage/lcov.info + files: ./coverage/lcov.info + fail_ci_if_error: false + flags: rust +