]> Untitled Git - bdk-cli/commitdiff
CI: Update code coverage to use Codecov action
authorVihiga Tyonum <withtvpeter@gmail.com>
Mon, 9 Mar 2026 22:02:07 +0000 (23:02 +0100)
committerVihiga Tyonum <withtvpeter@gmail.com>
Mon, 9 Mar 2026 22:18:37 +0000 (23:18 +0100)
- update checkout to v6
- update rust toolchain to use official action
- replace coveralls with codecov

.github/workflows/code_coverage.yml

index df3d3e953fe5f1eac39dabbf3d161d77315040c9..013d43e91446b5f48d64ac391126111e8604344a 100644 (file)
@@ -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
+