Skip to content

Commit 1589e8e

Browse files
ci: fix code coverage workflow
1 parent 2d85143 commit 1589e8e

File tree

1 file changed

+9
-7
lines changed

1 file changed

+9
-7
lines changed

.github/workflows/code_coverage.yml

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -20,27 +20,29 @@ jobs:
2020
persist-credentials: false
2121
- name: Install lcov tools
2222
run: sudo apt-get install lcov -y
23+
# This action automatically reads and applies rust-toolchain.toml
2324
- name: Install Rust toolchain
24-
uses: dtolnay/rust-toolchain@v1
25+
uses: actions-rust-lang/setup-rust-toolchain@v1
2526
with:
26-
toolchain: stable
27-
components: llvm-tools-preview
28-
- name: Rust Cache
29-
uses: Swatinem/rust-cache@98c8021b550208e191a6a3145459bfc9fb29c4c0
27+
components: llvm-tools-preview
28+
cache: true
3029
- name: Install grcov
3130
run: if [[ ! -e ~/.cargo/bin/grcov ]]; then cargo install grcov; fi
3231
- name: Test
3332
run: cargo test --all-features
3433
- name: Make coverage directory
3534
run: mkdir coverage
3635
- name: Run grcov
37-
run: grcov . --binary-path ./target/debug/ -s . -t lcov --branch --ignore-not-existing --keep-only '**/wallet/**' --ignore '**/tests/**' --ignore '**/examples/**' -o ./coverage/lcov.info
36+
run: grcov . --binary-path ./target/debug/ -s . -t lcov --branch --ignore-not-existing --keep-only 'src/**' --ignore 'tests/**' --ignore 'examples/**' -o ./coverage/lcov.info
3837
- name: Generate HTML coverage report
3938
run: genhtml -o coverage-report.html --ignore-errors unmapped ./coverage/lcov.info
4039
- name: Coveralls upload
41-
uses: coverallsapp/github-action@master
40+
# Action pinned at tag 2.3.6
41+
uses: coverallsapp/github-action@648a8eb78e6d50909eff900e4ec85cab4524a45b
4242
with:
4343
github-token: ${{ secrets.GITHUB_TOKEN }}
44+
file: ./coverage/lcov.info
45+
format: lcov
4446
- name: Upload artifact
4547
uses: actions/upload-artifact@v4
4648
with:

0 commit comments

Comments
 (0)