GitHub Actions Iterations
This commit is contained in:
33
.github/workflows/unittests.yaml
vendored
33
.github/workflows/unittests.yaml
vendored
@ -33,18 +33,39 @@ jobs:
|
|||||||
pip install pytest pytest-cov
|
pip install pytest pytest-cov
|
||||||
pip install -r requirements.txt
|
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
|
||||||
|
pip install pytest pytest-cov
|
||||||
|
pip install -r requirements.txt
|
||||||
|
|
||||||
- name: Run Coverage
|
- name: Run Coverage
|
||||||
run: |
|
run: |
|
||||||
pytest --junitxml=pytest.xml --cov-report=term-missing:skip-covered --cov=semver | tee pytest-coverage.txt
|
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
|
- name: Comment Result Summary
|
||||||
uses: MishaKav/pytest-coverage-comment@main
|
uses: MishaKav/pytest-coverage-comment@main
|
||||||
with:
|
with:
|
||||||
pytest-coverage-path: ./pytest-coverage.txt
|
pytest-coverage-path: ./pytest-coverage.txt
|
||||||
junitxml-path: ./pytest.xml
|
junitxml-path: ./pytest.xml
|
||||||
if: github.event_name == 'pull_request'
|
|
||||||
|
|
||||||
- name: Test
|
|
||||||
run: |
|
|
||||||
pytest
|
|
||||||
|
Reference in New Issue
Block a user