diff --git a/.github/workflows/unittests.yaml b/.github/workflows/unittests.yaml index 17f1fde..f06ce69 100644 --- a/.github/workflows/unittests.yaml +++ b/.github/workflows/unittests.yaml @@ -32,9 +32,10 @@ jobs: pip install pytest pytest-cov pip install -r requirements.txt - - name: pytest + - name: Run Coverage run: | pytest --junitxml=pytest.xml --cov-report=term-missing:skip-covered --cov=semver | tee pytest-coverage.txt + if: github.event_name == 'pull_request' - name: Comment Result Summary uses: MishaKav/pytest-coverage-comment@main @@ -43,7 +44,6 @@ jobs: junitxml-path: ./pytest.xml if: github.event_name == 'pull_request' - - name: Check results + - name: Test run: | - grep -q "FAILED" pytest-coverage.txt && exit 1 || exit 0 - grep -q "ERROR" pytest-coverage.txt && exit 1 || exit 0 + pytest