GitHub Actions Iterations

This commit is contained in:
Semantic Versioner 2023-07-22 05:24:36 -04:00
parent d2a3d5de6f
commit da1e716dde

View File

@ -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