diff --git a/.github/workflows/coverage.yml b/.github/workflows/coverage.yml index 92598ab7..c8971dc5 100644 --- a/.github/workflows/coverage.yml +++ b/.github/workflows/coverage.yml @@ -2,8 +2,7 @@ name: Task - Rust Tests & Coverage on: - workflow_dispatch: - workflow_call: + push: jobs: coverage: @@ -35,19 +34,26 @@ jobs: - uses: taiki-e/install-action@cargo-llvm-cov - uses: taiki-e/install-action@nextest - - name: Clean workspace - run: | - cargo llvm-cov clean --workspace + - name: Rust Cache + uses: actions/cache@v4 + with: + path: | + ~/.cargo/bin/ + ~/.cargo/registry/index/ + ~/.cargo/registry/cache/ + ~/.cargo/git/db/ + target/ + key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }} - name: Run llvm-cov run: | cargo llvm-cov nextest --release --lcov --output-path lcov.info --test-threads=1 - - name: Coveralls - uses: coverallsapp/github-action@v2 + - name: Upload coverage to codecov.io + uses: codecov/codecov-action@v3 with: files: lcov.info - debug: true + fail_ci_if_error: false - uses: colpal/actions-clean@v1 if: ${{ always() }} # To ensure this step runs even when earlier steps fail