diff --git a/.codecov.yml b/.codecov.yml new file mode 100644 index 00000000..4266a7e4 --- /dev/null +++ b/.codecov.yml @@ -0,0 +1,11 @@ +comment: false +coverage: + status: + project: + default: + target: auto + threshold: 5% + patch: + default: + target: auto + threshold: 5% diff --git a/.github/workflows/workflow.yml b/.github/workflows/workflow.yml index 8fc7c77d..5def187a 100644 --- a/.github/workflows/workflow.yml +++ b/.github/workflows/workflow.yml @@ -177,9 +177,13 @@ jobs: uses: actions-rs/toolchain@v1.0.7 with: toolchain: ${{ matrix.rust }} + components: llvm-tools-preview profile: minimal override: true + - name: Install cargo-llvm-cov + uses: taiki-e/install-action@cargo-llvm-cov + # Install Mercurial (pre-installed on Linux and windows) - name: Setup | Mercurial (macos) if: matrix.os == 'macOS-latest' @@ -187,7 +191,18 @@ jobs: # Run the ignored tests that expect the above setup - name: Build | Test - run: cargo test --workspace --locked --all-features -- -Z unstable-options --include-ignored + run: "cargo llvm-cov + --all-features + --locked + --workspace + --lcov --output-path lcov.info + -- --include-ignored" env: # Avoid -D warnings on nightly builds RUSTFLAGS: "" + + - name: Upload coverage to Codecov + uses: codecov/codecov-action@v3 + with: + files: lcov.info + fail_ci_if_error: true