From ea83bcbc0cb746140affa84da7f5db1e59e002ba Mon Sep 17 00:00:00 2001 From: Ivin Joel Abraham Date: Wed, 26 Feb 2025 18:38:37 +0530 Subject: [PATCH] ci: add codecov integration for test coverage tracking - Added `.github/workflows/coverage.yml` to automate test coverage reports - Workflows run on every push and PR to `master` and `unstable` - Uploads data to Codecov Signed-off-by: Ivin Joel Abraham --- .github/workflows/test_coverage.yml | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 .github/workflows/test_coverage.yml diff --git a/.github/workflows/test_coverage.yml b/.github/workflows/test_coverage.yml new file mode 100644 index 0000000..3725452 --- /dev/null +++ b/.github/workflows/test_coverage.yml @@ -0,0 +1,24 @@ +name: Code Coverage + +on: + push: + branches: [ master, unstable ] + pull_request: + branches: [ master, unstable ] + +jobs: + test-coverage-upload: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + with: + ref: ${{ github.event.pull_request.head.sha }} + + - name: Install cargo-tarpaulin + run: cargo install cargo-tarpaulin + + - name: Generate coverage report + run: cargo tarpaulin --verbose --out lcov + + - name: Upload coverage to Codecov + uses: codecov/codecov-action@v5