Do some additional cleanup. #83
Workflow file for this run
This file contains hidden or 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: Python package | |
| on: [push] | |
| jobs: | |
| build: | |
| runs-on: ${{ matrix.os }} | |
| strategy: | |
| matrix: | |
| python: ['3.9', '3.10', '3.11', '3.12', '3.13'] | |
| os: [macos-latest, ubuntu-latest, windows-latest] | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Setup Python | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: ${{ matrix.python }} | |
| - name: Install tox and any other packages | |
| run: pip install tox | |
| - name: Run tox | |
| # Run tox using the version of Python in `PATH` | |
| run: tox -e py | |
| coverage: | |
| needs: build | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Setup Python | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: '3.13' | |
| - name: Install tox and any other packages | |
| run: pip install tox | |
| - name: Collect coverage data | |
| run: tox -e coverage | |
| - name: Combine coverage & fail if it's <100% | |
| run: | | |
| python -Im pip install --upgrade coverage[toml] | |
| python -Im coverage html --skip-covered --skip-empty | |
| # Report and write to summary. | |
| python -Im coverage report --format=markdown >> $GITHUB_STEP_SUMMARY | |
| # Report again and fail if under 100%. | |
| python -Im coverage report --fail-under=100 | |
| - name: Upload HTML report if check failed | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: html-report | |
| path: htmlcov | |
| if: ${{ failure() }} |