fix: Fix warnings #7
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Coverage | |
env: | |
CARGO_INCREMENTAL: 0 | |
on: | |
push: | |
branches: ["**"] | |
tags-ignore: ["**"] | |
paths-ignore: | |
- "**.md" | |
- LICENSE | |
pull_request: | |
paths-ignore: | |
- "**.md" | |
- "**/LICENSE" | |
- .github/FUNDING.yml | |
- .editorconfig | |
- .gitignore | |
jobs: | |
coverage: | |
runs-on: ubuntu-20.04 | |
if: ${{ (github.event_name == 'pull_request' && github.event.pull_request.head.repo.fork) || github.event_name == 'push' }} | |
steps: | |
- name: Checkout sources | |
uses: actions/checkout@v4 | |
with: | |
persist-credentials: false | |
- name: Install Rust toolchain | |
uses: dtolnay/rust-toolchain@master | |
with: | |
toolchain: nightly | |
components: llvm-tools-preview | |
- 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 | |
- name: Generate coverage report | |
run: | | |
cargo llvm-cov clean | |
cargo llvm-cov --no-report --all-features -- --test-threads=1 | |
cargo llvm-cov --no-report --tests --all-features -- compile_fail | |
cargo llvm-cov --no-run --lcov > lcov.txt | |
- name: Upload coverage report | |
uses: codecov/codecov-action@v3 | |
with: | |
files: ./lcov.txt |