Skip to content

Commit 6bc5f33

Browse files
committed
Merge commit 'refs/pull/960/head' of github.com:bitcoindevkit/bdk
Reenable code coverage upload to Coveralls, only for /crates repos
2 parents 702fe7a + c1cffe9 commit 6bc5f33

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
@@ -9,7 +9,7 @@ jobs:
99
env:
1010
RUSTFLAGS: "-Cinstrument-coverage"
1111
RUSTDOCFLAGS: "-Cinstrument-coverage"
12-
LLVM_PROFILE_FILE: "report-%p-%m.profraw"
12+
LLVM_PROFILE_FILE: "./target/coverage/%p-%m.profraw"
1313

1414
steps:
1515
- name: Checkout
@@ -39,14 +39,16 @@ jobs:
3939
run: pip install hwi==2.1.1 protobuf==3.20.1
4040
- name: Test
4141
run: cargo test --all-features
42+
- name: Make coverage directory
43+
run: mkdir coverage
4244
- name: Run grcov
43-
run: mkdir coverage; grcov . --binary-path ./target/debug/ -s . -t lcov --branch --ignore-not-existing --ignore '/*' -o ./coverage/lcov.info
45+
run: grcov . --binary-path ./target/debug/ -s . -t lcov --branch --ignore-not-existing --keep-only '**/crates/**' --ignore '**/tests/**' --ignore '**/examples/**' -o ./coverage/lcov.info
4446
- name: Generate HTML coverage report
45-
run: genhtml -o coverage-report.html ./coverage/lcov.info
46-
# - name: Coveralls upload
47-
# uses: coverallsapp/github-action@master
48-
# with:
49-
# github-token: ${{ secrets.GITHUB_TOKEN }}
47+
run: genhtml -o coverage-report.html --ignore-errors source ./coverage/lcov.info
48+
- name: Coveralls upload
49+
uses: coverallsapp/github-action@master
50+
with:
51+
github-token: ${{ secrets.GITHUB_TOKEN }}
5052
- name: Upload artifact
5153
uses: actions/upload-artifact@v2
5254
with:

0 commit comments

Comments
 (0)