ci: improve pytest integration
This commit is contained in:
@@ -4,7 +4,7 @@ concurrency:
|
|||||||
group: ${{ github.workflow }}-${{ github.ref }}
|
group: ${{ github.workflow }}-${{ github.ref }}
|
||||||
cancel-in-progress: true
|
cancel-in-progress: true
|
||||||
jobs:
|
jobs:
|
||||||
pytest:
|
Test:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v4
|
||||||
@@ -14,5 +14,12 @@ jobs:
|
|||||||
cache: "pip"
|
cache: "pip"
|
||||||
- name: Install dependencies
|
- name: Install dependencies
|
||||||
run: pip install -r requirements.txt
|
run: pip install -r requirements.txt
|
||||||
|
- name: Install failure annotation plugin
|
||||||
|
run: pip install pytest-github-actions-annotate-failures
|
||||||
- name: Test with pytest
|
- name: Test with pytest
|
||||||
run: pytest ./test --junitxml=junit/test-results.xml --cov=com --cov-report=xml --cov-report=html
|
run: pytest --junitxml=pytest.xml --cov-report=term-missing:skip-covered --cov-report=html --cov | tee pytest-coverage.txt
|
||||||
|
- name: Comment pytest code coverage
|
||||||
|
uses: MishaKav/pytest-coverage-comment@main
|
||||||
|
with:
|
||||||
|
pytest-coverage-path: ./pytest-coverage.txt
|
||||||
|
junitxml-path: ./pytest.xml
|
||||||
|
|||||||
Reference in New Issue
Block a user