From 25abc19161164464a4f51a2debf9b01c2c60b800 Mon Sep 17 00:00:00 2001 From: realaravinth Date: Wed, 5 Jan 2022 13:03:27 +0530 Subject: [PATCH] feat: use cargo-tarpaulin for generating coverage --- .github/workflows/coverage.yml | 12 ++++++++---- .gitignore | 2 ++ 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/.github/workflows/coverage.yml b/.github/workflows/coverage.yml index f15fa4c..3146d1a 100644 --- a/.github/workflows/coverage.yml +++ b/.github/workflows/coverage.yml @@ -36,10 +36,14 @@ jobs: profile: minimal override: true - - name: generate coverage - run: make coverage + - name: Generate coverage file + if: (github.ref == 'refs/heads/master' || github.event_name == 'pull_request') + uses: actions-rs/tarpaulin@v0.1 + with: + args: "-t 1200" + env: + GIT_HASH: 8e77345f1597e40c2e266cb4e6dee74888918a61 - name: Upload to Codecov uses: codecov/codecov-action@v2 - with: - files: ./target/lcov.info,coverage.xml + if: github.ref == 'refs/heads/master' diff --git a/.gitignore b/.gitignore index 4e0a7f4..a5012c7 100644 --- a/.gitignore +++ b/.gitignore @@ -2,3 +2,5 @@ posts_cache tmp/ *.profraw +tarpaulin-report.html +coverage.xml