From 4bf12441a049c36a9eb99c1f9a9cafc7a38054f1 Mon Sep 17 00:00:00 2001 From: Rodrigo Vargas Honorato Date: Tue, 23 Apr 2024 12:28:33 +0200 Subject: [PATCH] Refactor test workflow in .github/workflows/test.yml (#28) --- .github/workflows/test.yml | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 038a803..877765c 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -21,12 +21,11 @@ jobs: target: test tags: whiscy:test - - name: Run unit tests - id: unit-tests + - name: Run tests run: > - docker run -v ${PWD}/coverage-report:/opt/software/whiscy/coverage-report --rm whiscy:test pytest -m unit --cov --cov-report xml:/opt/software/whiscy/coverage-report/coverage.xml --cov-append -vv --hypothesis-show-statistics + docker run -v ${PWD}/coverage-report:/opt/software/whiscy/coverage-report --rm whiscy:test pytest --cov --cov-report xml:/opt/software/whiscy/coverage-report/coverage.xml --cov-append -vv --hypothesis-show-statistics - - name: Run regression tests - if: steps.unit-tests.outcome == 'success' - run: > - docker run -v ${PWD}/coverage-report:/opt/software/whiscy/coverage-report --rm whiscy:test pytest -m regression --cov --cov-report xml:/opt/software/whiscy/coverage-report/coverage.xml --cov-append -vv --hypothesis-show-statistics + - uses: codacy/codacy-coverage-reporter-action@v1 + with: + project-token: ${{ secrets.CODACY_PROJECT_TOKEN }} + coverage-reports: ./coverage-report/coverage.xml