GitHub Actions Iterations
This commit is contained in:
parent
d2a3d5de6f
commit
da1e716dde
33
.github/workflows/unittests.yaml
vendored
33
.github/workflows/unittests.yaml
vendored
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user