V0.2.2 #349
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 | |
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: Coverage py3.10 | |
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] | |
- name: Run tests | |
run: | | |
coverage run -m pytest | |
- name: Generate report | |
run: | | |
coverage xml | |
coverage report | |
- name: Generate html | |
if: failure() | |
run: | | |
coverage html | |
- name: Upload report | |
if: always() | |
uses: actions/upload-artifact@v4 | |
with: | |
name: coverage-data | |
path: coverage/* | |
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/* | |
test-versions: | |
# Limit matrix to after base is passing | |
needs: [test-coverage, linting, test-packaging] | |
strategy: | |
fail-fast: false | |
matrix: | |
python-version: ["3.10", "3.11"] | |
os: | |
- ubuntu-latest | |
- windows-latest | |
- macos-latest | |
include: | |
- experimental: false | |
name: Test python-${{ matrix.python-version }} on ${{ matrix.os }} | |
runs-on: ${{ matrix.os }} | |
continue-on-error: ${{ matrix.experimental }} | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Setup Python | |
uses: actions/setup-python@v5 | |
with: | |
python-version: ${{ matrix.python-version }} | |
- name: Install dependencies | |
run: | | |
pip install --upgrade pip | |
pip install -e .[dev] | |
- name: Run tests | |
run: | | |
pytest |