From 6d0114aafc6b0cf85b954b0eadc2126ef62e18a6 Mon Sep 17 00:00:00 2001 From: Stijnvandenbroek Date: Wed, 11 Mar 2026 13:32:37 +0000 Subject: [PATCH] feat: round coverage percentage --- .github/workflows/ci.yml | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 507d895..8f54125 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -83,13 +83,18 @@ jobs: - name: Run tests with coverage run: uv run pytest tests/ --cov=data_platform --cov-report=json:coverage.json + - name: Round coverage percentage + if: github.ref == 'refs/heads/main' + run: | + COVERAGE=$(python -c "import json; print(round(json.load(open('coverage.json'))['totals']['percent_covered']))") + echo "COVERAGE=$COVERAGE" >> $GITHUB_ENV + - name: Generate coverage badge if: github.ref == 'refs/heads/main' uses: jaywcjlove/coverage-badges-cli@v2.1.0 with: - source: coverage.json output: badge/coverage-badge.svg - jsonPath: totals.percent_covered + value: ${{ env.COVERAGE }}% - name: Deploy coverage badge if: github.ref == 'refs/heads/main'