From 7a628e6e7df89834e98fe2e27aef46827b68957f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tina=20M=C3=BCller?= Date: Wed, 2 Apr 2025 19:58:20 +0200 Subject: [PATCH] ci: Collect statement coverage only * And run with coverage only when also uploading the report Before we collected also branch and condition coverage, which resulted in a codecov.json file with items like "1/2" instead of just 1 or null. --- .github/workflows/ci-tests.yaml | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ci-tests.yaml b/.github/workflows/ci-tests.yaml index 64c7963..763ff56 100644 --- a/.github/workflows/ci-tests.yaml +++ b/.github/workflows/ci-tests.yaml @@ -34,8 +34,14 @@ jobs: perl Build.PL ./Build build - name: Run tests + if: matrix.perl != 'latest' run: | - TEST_SHARED=1 TEST_SUBREAPER=1 cover -test -report codecovbash + TEST_SHARED=1 TEST_SUBREAPER=1 prove -l t + - name: Run tests with coverage + if: matrix.perl == 'latest' + run: | + TEST_SHARED=1 TEST_SUBREAPER=1 PERL5OPT="-MDevel::Cover=-coverage,statement" prove -l t + cover -report codecovbash - name: Upload coverage to ☂️ Codecov uses: codecov/codecov-action@v5 if: matrix.perl == 'latest'