Feat/ignore no tests collected #17
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Test Python Packages | |
on: | |
push: | |
branches: [ "main" ] | |
pull_request: | |
paths: | |
- "**/*.py" | |
jobs: | |
test-build: | |
timeout-minutes: 10 | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: actions/setup-python@v4 | |
with: | |
python-version: '3.7' | |
- run: | | |
pip install -U pip | |
pip install flit | |
flit build | |
test-package: | |
timeout-minutes: 10 | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
python-version: [ '3.7', '3.11' ] | |
fail-fast: false | |
container: | |
image: python:${{ matrix.python-version }}-bullseye | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Install dependencies | |
run: | | |
python -m pip install --upgrade pip | |
pip install -e . | |
pip install pytest pytest-cov | |
- name: Test with pytest | |
run: | | |
pytest --cov pytest_ignore_test_results --cov-report term-missing --cov-report xml --junitxml=results.xml | |
- name: Pytest coverage comment | |
uses: MishaKav/pytest-coverage-comment@main | |
with: | |
pytest-coverage-path: coverage.xml | |
junitxml-path: results.xml |