Skip to content

Commit f86891a

Browse files
committed
Remove branch coverage
1 parent 806c98c commit f86891a

File tree

2 files changed

+6
-9
lines changed

2 files changed

+6
-9
lines changed

.github/workflows/test.yaml

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -37,11 +37,10 @@ jobs:
3737
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('Cargo.lock') }}
3838
- name: Generate test result and coverage report
3939
run: |
40-
cargo install cargo2junit grcov rust-covfix;
41-
cargo test --features coverage $CARGO_OPTIONS -- -Z unstable-options --format json | cargo2junit > results.xml;
40+
cargo install cargo2junit grcov;
41+
cargo test $CARGO_OPTIONS -- -Z unstable-options --format json | cargo2junit > results.xml;
4242
zip -0 ccov.zip `find . \( -name "$PROJECT_NAME_UNDERSCORE*.gc*" \) -print`;
43-
grcov ccov.zip -s . -t lcov --llvm --branch --ignore-not-existing --ignore "/*" --ignore "tests/*" -o lcov.info;
44-
rust-covfix -o lcov_correct.info lcov.info;
43+
grcov ccov.zip -s . -t lcov --llvm --ignore-not-existing --ignore "/*" --ignore "tests/*" -o lcov.info;
4544
- name: Upload test results
4645
uses: EnricoMi/publish-unit-test-result-action@v1
4746
with:
@@ -53,5 +52,5 @@ jobs:
5352
with:
5453
# required for private repositories:
5554
# token: ${{ secrets.CODECOV_TOKEN }}
56-
files: ./lcov_correct.info
55+
files: ./lcov.info
5756
fail_ci_if_error: true

README.md

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -72,22 +72,20 @@ Steps:
7272
- Cache is stored at the end of the job on cache miss. Cache is not updated on cache hit.
7373

7474
2. Generate test results and code coverage data.
75-
1. It installs [cargo2junit](https://github.com/johnterickson/cargo2junit) needed for formatting the test result and [grcov](https://github.com/mozilla/grcov) and [rust-covfix](https://github.com/Kogia-sima/rust-covfix) for code coverage.
75+
1. It installs [cargo2junit](https://github.com/johnterickson/cargo2junit) needed for formatting the test result and [grcov](https://github.com/mozilla/grcov) for code coverage.
7676
3. It runs `cargo test` in the nightly toolchain.
77-
- `--features coverage` adds a `rust-covfix` feature that allows disabling inlining functions for code coverage. [Learn more.](https://github.com/Kogia-sima/rust-covfix#1-avoid-inlining-the-functions-optional)
7877
- `$CARGO_OPTIONS` includes `CARGO_INCREMENTAL`, `RUSTFLAGS`, and `RUSTDOCFLAGS` options needed for code coverage.
7978
- `-Z unstable-options --format json` formats the test result into json.
8079
- ` | cargo2junit > results.xml` converts the json result into junit format for `EnricoMi/publish-unit-test-result-action` to understand and saves it as `results.xml`.
8180
4. It generates code coverage data in lcov format through `grcov` saved as `lcov.info`.
82-
5. It runs `rust-covfix` to fix incorrect Rust coverage data and saves the corrected data as `lcov_correct.info`.
8381

8482
3. Upload test results.
8583
It uploads the test result (`results.xml`) through [EnricoMi/publish-unit-test-result-action@v1](https://github.com/EnricoMi/publish-unit-test-result-action).
8684
- The action outputs the test result (**Test Results** added to a random workflow).
8785
- For pull requests, the action adds a comment containing the test results.
8886

8987
4. Upload to CodeCov.
90-
It uploads the code coverage result (`lcov_correct.info`) to CodeCov through [codecov/codecov-action@v1](https://github.com/codecov/codecov-action).
88+
It uploads the code coverage result (`lcov.info`) to CodeCov through [codecov/codecov-action@v1](https://github.com/codecov/codecov-action).
9189
- For pull requests, the actions adds a comment containing the code coverage report.
9290
- For private repositories, add your token from CodeCov repository setting on GitHub Secrets and uncomment the line: `token: ${{ secrets.CODECOV_TOKEN }}`.
9391

0 commit comments

Comments
 (0)