From 36e0d67530a94462fc1423585d78947749f05c65 Mon Sep 17 00:00:00 2001 From: Matthew Feickert Date: Wed, 23 Mar 2022 13:43:49 -0500 Subject: [PATCH] ci: Report coverage for oldest and newest Python tested (#1817) * Report coverage for the oldest Python (3.7) and newest (3.10) that are tested to ensure that version specific 'if' statements are properly covered. * Add Python version specific flags to the coverage reporting to compare differences in coverage and track coverage changes across versions more easily. * Follow up to PR #1753 --- .github/workflows/ci.yml | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 5589b484f7..8841b37752 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -55,12 +55,16 @@ jobs: if: failure() && github.event_name == 'workflow_dispatch' uses: mxschmitt/action-tmate@v3 + # Report coverage for oldest and newest Python tested to deal with version differences - name: Report core project coverage with Codecov - if: github.event_name != 'schedule' && matrix.python-version == '3.10' && matrix.os == 'ubuntu-latest' + if: >- + github.event_name != 'schedule' && + (matrix.python-version == '3.7' || matrix.python-version == '3.10') && + matrix.os == 'ubuntu-latest' uses: codecov/codecov-action@v2 with: files: ./coverage.xml - flags: unittests + flags: unittests-${{ matrix.python-version }} - name: Test Contrib module with pytest run: |