diff --git a/.github/workflows/test.yaml b/.github/workflows/test.yaml index c3b2d73..02c5188 100644 --- a/.github/workflows/test.yaml +++ b/.github/workflows/test.yaml @@ -7,10 +7,17 @@ jobs: name: Test runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v3 + - name: Install Rust + run: rustup toolchain install stable --component llvm-tools-preview + - name: Install cargo-llvm-cov + uses: taiki-e/install-action@cargo-llvm-cov - uses: Swatinem/rust-cache@v1 - - uses: actions-rs/toolchain@v1 + - name: Generate code coverage + run: cargo llvm-cov --lcov --output-path lcov.info + - name: Upload coverage to Codecov + uses: codecov/codecov-action@v3 with: - toolchain: stable - - name: test - run: cargo test + token: ${{ secrets.CODECOV_TOKEN }} # not required for public repos + files: lcov.info + fail_ci_if_error: true