Automate PyPI releases #1
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: CI | |
| on: | |
| push: | |
| branches: [master] | |
| pull_request: | |
| branches: [master] | |
| permissions: | |
| contents: read | |
| jobs: | |
| test: | |
| name: Python ${{ matrix.python-version }} | |
| runs-on: ubuntu-latest | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| python-version: ["3.12", "3.13", "3.14"] | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Set up Python ${{ matrix.python-version }} | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: ${{ matrix.python-version }} | |
| cache: pip | |
| cache-dependency-path: | | |
| requirements.txt | |
| requirements-test.txt | |
| - name: Install test dependencies | |
| run: | | |
| python -m pip install --upgrade pip | |
| python -m pip install --editable . --requirement requirements-test.txt | |
| - name: Run unit and integration tests | |
| run: python -m pytest -q | |
| - name: Run acceptance tests | |
| run: python -m behave --format progress --stop --tags=-wip | |
| quality: | |
| name: Integration quality and package build | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Set up Python 3.12 | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: "3.12" | |
| cache: pip | |
| cache-dependency-path: | | |
| requirements.txt | |
| requirements-test.txt | |
| - name: Install development tools | |
| run: | | |
| python -m pip install --upgrade pip | |
| python -m pip install \ | |
| --editable . \ | |
| --requirement requirements-test.txt \ | |
| --requirement requirements-docs.txt \ | |
| pyright \ | |
| build | |
| - name: Check formatting | |
| run: | | |
| python -m ruff format --check \ | |
| tests/integration \ | |
| tests/fixtures/customxml/generate_fixture.py | |
| - name: Run lint checks | |
| run: | | |
| python -m ruff check \ | |
| tests/integration \ | |
| tests/fixtures/customxml/generate_fixture.py | |
| - name: Run type checks | |
| run: | | |
| python -m pyright \ | |
| tests/integration \ | |
| tests/fixtures/customxml/generate_fixture.py | |
| - name: Build documentation | |
| run: python -m sphinx -W --keep-going -b html docs docs/.build/html | |
| - name: Build distributions | |
| run: python -m build |