Skip to content

Commit ea2bb7f

Browse files
committed
Try to fix codecov
1 parent adc7c88 commit ea2bb7f

File tree

2 files changed

+17
-18
lines changed

2 files changed

+17
-18
lines changed

.github/workflows/codecov.yml

+16-17
Original file line numberDiff line numberDiff line change
@@ -17,29 +17,28 @@ jobs:
1717
- uses: actions/checkout@v3
1818
- uses: actions-rs/toolchain@v1
1919
with:
20-
toolchain: nightly
20+
toolchain: stable
2121
override: true
2222
components: llvm-tools-preview # Required for grcov
2323

2424
- name: Build
2525
run: cargo build --verbose
2626

27-
- name: Run tests
28-
run: cargo test --verbose --no-fail-fast
27+
- name: Install cargo-llvm-cov and run tests
28+
run: cargo install cargo-llvm-cov && cargo llvm-cov --lcov --output-path=./lcov.info
2929
env:
3030
CARGO_INCREMENTAL: '0'
31-
RUSTFLAGS: '-Zprofile -Ccodegen-units=1 -Cinline-threshold=0 -Clink-dead-code -Coverflow-checks=off -Cpanic=abort -Zpanic_abort_tests'
32-
RUSTDOCFLAGS: '-Zprofile -Ccodegen-units=1 -Cinline-threshold=0 -Clink-dead-code -Coverflow-checks=off -Cpanic=abort -Zpanic_abort_tests'
31+
RUSTFLAGS: '-Ccodegen-units=1 -Cinline-threshold=0 -Clink-dead-code -Coverflow-checks=off -Cinstrument-coverage'
32+
RUSTDOCFLAGS: '-Ccodegen-units=1 -Cinline-threshold=0 -Clink-dead-code -Coverflow-checks=off -Cinstrument-coverage'
33+
34+
- name: Codecov
35+
# You may pin to the exact commit or the version.
36+
uses: codecov/[email protected]
37+
with:
38+
# Repository upload token - get it from codecov.io. Required only for private repositories
39+
token: ${{ secrets.CODECOV_TOKEN }}
40+
file: ./lcov.info
41+
# Specify whether the Codecov output should be verbose
42+
verbose: true
43+
fail_ci_if_error: true
3344

34-
- name: Run grcov
35-
run: |
36-
cargo install grcov
37-
grcov . -s . --binary-path ./target/debug/ -t lcov --branch --ignore-not-existing --ignore "/*" -o lcov.info
38-
39-
- name: Upload coverage to Codecov
40-
uses: codecov/codecov-action@v3
41-
with:
42-
token: ${{ secrets.CODECOV_TOKEN }}
43-
files: lcov.info
44-
fail_ci_if_error: true
45-
verbose: true

Cargo.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "sketchlib"
3-
version = "0.1.0"
3+
version = "0.1.1"
44
authors = [
55
"John Lees <[email protected]>",
66
"Nicholas Croucher <[email protected]>",

0 commit comments

Comments
 (0)