need coverage #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: CI | |
on: | |
push: {} | |
pull_request: {} | |
workflow_dispatch: {} | |
permissions: "read-all" | |
jobs: | |
linting: | |
name: linting via pre-commit | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Setup Python | |
uses: actions/setup-python@v5 | |
with: | |
python-version: "3.10" | |
- name: Install pre-commit | |
run: | | |
pip install --upgrade pip | |
pip install pre-commit | |
- name: Run pre-commit steps | |
run: | | |
pre-commit run --all-files | |
test-coverage: | |
name: Test base configuration with coverage | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Setup Python | |
uses: actions/setup-python@v5 | |
with: | |
python-version: "3.10" | |
- name: Install dependencies | |
run: | | |
pip install --upgrade pip | |
pip install -e .[dev,audit] | |
- name: Run tests | |
run: | | |
coverage run -m pytest | |
- name: Generate coverage report | |
run: | | |
coverage xml | |
- name: Generate htmp report for inspection | |
if: failure() | |
run: | | |
coverage html | |
- name: Upload coverage | |
if: always() | |
uses: actions/upload-artifact@v4 | |
with: | |
name: coverage-data | |
path: coverage/coverage.xml | |
if-no-files-found: error | |
test-packaging: | |
name: Test packaging | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Setup Python | |
uses: actions/setup-python@v5 | |
with: | |
python-version: "3.10" | |
- name: Install dependencies | |
run: | | |
pip install --upgrade pip | |
pip install build twine | |
- name: Build package | |
run: | | |
python -m build | |
python -m twine check dist/* |