From 85a9c0dffeeeda58deecfb35077c3e88d5bd8dc6 Mon Sep 17 00:00:00 2001 From: James Westby Date: Mon, 15 Jul 2024 11:55:16 +0100 Subject: [PATCH] Add codecov to actions --- .github/workflows/cargo.yml | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/.github/workflows/cargo.yml b/.github/workflows/cargo.yml index 433c1a9..7eed81b 100644 --- a/.github/workflows/cargo.yml +++ b/.github/workflows/cargo.yml @@ -31,7 +31,7 @@ jobs: - name: Run cargo fmt run: cargo fmt --check - name: Run tests - run: cargo llvm-cov --all-features --workspace --codecov --output-path lcov.info nextest + run: cargo llvm-cov --all-features --workspace --codecov --output-path codecov.json nextest - name: Show coverage report run: cargo llvm-cov report - name: Check link @@ -39,5 +39,11 @@ jobs: with: token: ${{ secrets.GITHUB_TOKEN }} args: --all-targets --all-features -- -D warnings + - name: Upload coverage to Codecov + uses: codecov/codecov-action@v3 + with: + token: ${{ secrets.CODECOV_TOKEN }} # not required for public repos + files: codecov.json + fail_ci_if_error: true - name: Run cargo check run: cargo check