From eafad5669c2dbfe65a50ae5cfe0184c27a9d5a19 Mon Sep 17 00:00:00 2001 From: Aimilia Dimitra Ktena Date: Sat, 8 Jun 2024 19:33:54 +0300 Subject: [PATCH] Add coverage commands to existing test job --- .github/workflows/github-actions.yml | 21 ++++++++++----------- 1 file changed, 10 insertions(+), 11 deletions(-) diff --git a/.github/workflows/github-actions.yml b/.github/workflows/github-actions.yml index bbd51fda..5aefb91f 100644 --- a/.github/workflows/github-actions.yml +++ b/.github/workflows/github-actions.yml @@ -119,8 +119,16 @@ jobs: - name: test env: TOXPYTHON: '${{ matrix.toxpython }}' - run: > - tox -e ${{ matrix.tox_env }} -v + run: | + coverage run -m unittest + coverage xml -o coverage.xml + - uses: codecov/codecov-action@v4.0.1 + with: + token: ${{ secrets.CODECOV_TOKEN }} + files: ./coverage.xml + env_vars: OS,PYTHON + name: codecov-umbrella + fail_ci_if_error: true deploy_docs: name: Deploy docs to GitHub Pages @@ -162,15 +170,6 @@ jobs: echo "::warning title=Invalid file permissions automatically fixed::$line" done - - name: Generate Report - run: | - coverage run -m unittest - - - name: Upload coverage reports to Codecov - uses: codecov/codecov-action@v4.0.1 - with: - token: ${{ secrets.CODECOV_TOKEN }} - - name: upload artifact uses: actions/upload-pages-artifact@v3