From e0b7847deec2cee17b4272b6bbee7cfdc67e273e Mon Sep 17 00:00:00 2001 From: Atharva Arya Date: Thu, 25 Jul 2024 13:46:56 +0530 Subject: [PATCH] Fix coverage report type --- .github/workflows/tests.yml | 20 ++++++++++++++------ 1 file changed, 14 insertions(+), 6 deletions(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index f2d9ad7c4f5..6ad45cb2015 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -26,7 +26,7 @@ on: env: CACHE_NUMBER: 0 # increase to reset cache manually - PYTEST_FLAGS: --tardis-refdata=${{ github.workspace }}/tardis-refdata --tardis-regression-data=${{ github.workspace }}/tardis-regression-data --cov=tardis --cov-report=xml --cov-report=html + PYTEST_FLAGS: --tardis-refdata=${{ github.workspace }}/tardis-refdata --tardis-regression-data=${{ github.workspace }}/tardis-regression-data --cov=tardis --cov-report=xml --cov-report=html --cov-append CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} defaults: @@ -88,29 +88,37 @@ jobs: run: pytest tardis ${{ env.PYTEST_FLAGS }} --generate-reference -m "${{ matrix.continuum }} continuum and ${{ matrix.rpacket_tracking }} rpacket_tracking" if: contains(github.event.pull_request.labels.*.name, 'run-generation-tests') || github.ref == 'refs/heads/master' + - run: mv .coverage .coverage.${{ strategy.job-index }} + - uses: actions/upload-artifact@v4 with: + name: coverage-${{ matrix.continuum }}-continuum-${{ matrix.rpacket_tracking }}-rpacket_tracking-${{ matrix.os }} path: | .coverage* - !.coveragec + !.coveragerc combine_coverage_reports: needs: [tests] if: github.repository_owner == 'tardis-sn' runs-on: ubuntu-latest steps: + - uses: actions/checkout@v4 - name: Setup environment uses: ./.github/actions/setup_env with: os-label: linux-64 - + # will download all artifacts(in this case all are coverage reports) - uses: actions/download-artifact@v4 - - - run: ls -a + with: + path: . + merge-multiple: true - name: Combine coverage reports - run: coverage combine + run: | + coverage combine + coverage xml + coverage html - name: Print report run: coverage report