Skip to content

Re-enabled code coverage #1250

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Apr 4, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
41 changes: 19 additions & 22 deletions .github/workflows/coverage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -113,29 +113,26 @@ jobs:

- uses: actions-rs/toolchain@v1
with:
toolchain: stable
profile: minimal
toolchain: nightly
components: clippy, llvm-tools-preview, rustfmt

- uses: Swatinem/rust-cache@v1

- name: Compile tests
run: cargo test --no-run --locked

- name: Run tests
run: cargo test --all-features
- name: Install cargo-llvm-cov
run: |
curl -LsSf https://github.com/taiki-e/cargo-llvm-cov/releases/latest/download/cargo-llvm-cov-x86_64-unknown-linux-gnu.tar.gz | \
tar xzf - -C ~/.cargo/bin

# Code coverage. Was removed due to #1221
- uses: Swatinem/rust-cache@v1

# - name: Generate code coverage
# run: |
# cargo +nightly llvm-cov clean --workspace
# cargo +nightly llvm-cov --test failpoints --no-report --features fail/failpoints
# cargo +nightly llvm-cov --no-report --all-features
# cargo +nightly llvm-cov --no-run --lcov --output-path lcov.info
- name: Generate code coverage
run: |
cargo +nightly llvm-cov clean --workspace
cargo +nightly llvm-cov --test failpoints --no-report --features fail/failpoints
cargo +nightly llvm-cov --no-report --all-features
cargo +nightly llvm-cov --no-run --lcov --output-path lcov.info

# - name: Upload coverage to Codecov
# uses: codecov/[email protected]
# with:
# token: ${{ secrets.CODECOV_TOKEN }} # not required for public repos
# files: lcov.info
# fail_ci_if_error: true
- name: Upload coverage to Codecov
uses: codecov/[email protected]
with:
token: ${{ secrets.CODECOV_TOKEN }} # not required for public repos
files: lcov.info
fail_ci_if_error: true