diff --git a/.github/workflows/unittests.yaml b/.github/workflows/unittests.yaml index 819b888..47684ce 100644 --- a/.github/workflows/unittests.yaml +++ b/.github/workflows/unittests.yaml @@ -27,6 +27,33 @@ jobs: python-version: ${{ matrix.python-version }} cache: pip + - name: Install dependencies + run: | + python -m pip install --upgrade pip + pip install pytest pytest-cov + pip install -r requirements.txt + + - name: Test + run: | + pytest + pr: + name: Coverage Summary + runs-on: ubuntu-22.04 + + if: github.event_name == 'pull_request' + strategy: + fail-fast: false + + steps: + - name: Checkout + uses: actions/checkout@v3 + + - name: Set up Python + uses: actions/setup-python@v2 + with: + python-version: "3.11" + cache: pip + - name: Install dependencies run: | python -m pip install --upgrade pip @@ -36,15 +63,9 @@ jobs: - 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 with: pytest-coverage-path: ./pytest-coverage.txt junitxml-path: ./pytest.xml - if: github.event_name == 'pull_request' - - - name: Test - run: | - pytest