diff --git a/.github/workflows/coverage.yaml b/.github/workflows/coverage.yaml index 8d2deff..0df0474 100644 --- a/.github/workflows/coverage.yaml +++ b/.github/workflows/coverage.yaml @@ -38,10 +38,10 @@ jobs: run: cargo install cargo-llvm-cov - name: Run tests - run: cargo llvm-cov --lcov --no-report + run: cargo llvm-cov --lcov --no-report --ignore-filename-regex 'tests.rs|benches.rs|gendoc' - name: Generate coverage report - run: cargo llvm-cov --lcov --no-run --output-path lcov.info + run: cargo llvm-cov report --lcov --ignore-filename-regex 'tests.rs|benches.rs|gendoc' --output-path lcov.info - name: Upload coverage report to Codecov uses: codecov/codecov-action@v3.1.1 diff --git a/README.md b/README.md index fd28166..74d3642 100644 --- a/README.md +++ b/README.md @@ -35,3 +35,10 @@ dependency. 1. Run tests `cargo test` 2. Run formatter `cargo fmt` 3. Check linter `cargo clippy` and if you want to automatically fix then run `cargo clippy --fix` + +## Coverage + +Test coverage checks are performed in the pipeline. This is cofigured here: `.github/workflows/coverage.yaml` +To run these locally: +1. Install coverage tool by running `cargo install cargo-llvm-cov` +2. Run `cargo llvm-cov --ignore-filename-regex 'tests.rs|benches.rs|gendoc'` (you may be asked if you want to install `llvm-tools-preview`, if so type `Y`)