Migrate to hatch #277
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: | |
branches: ["main"] | |
pull_request: | |
branches: ["main"] | |
workflow_dispatch: | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.sha }} | |
cancel-in-progress: true | |
env: | |
STABLE_PYTHON_VERSION: '3.11' | |
PYTHONUNBUFFERED: "1" | |
FORCE_COLOR: "1" | |
jobs: | |
tests: | |
name: "Python ${{ matrix.python-version }}" | |
runs-on: "ubuntu-latest" | |
env: | |
USING_COVERAGE: '3.8,3.9,3.10,3.11,3.12' | |
strategy: | |
fail-fast: false | |
matrix: | |
python-version: ["3.8", "3.9", "3.10", "3.11", "3.12"] | |
steps: | |
- uses: "actions/checkout@v4" | |
- name: Set up Python ${{ matrix.python-version }} | |
uses: "actions/setup-python@v4" | |
with: | |
python-version: ${{ matrix.python-version }} | |
- name: "Upgrade pip" | |
run: | | |
set -xe | |
python -VV | |
python -m site | |
python -m pip install --upgrade pip | |
pip install hatch | |
hatch env create test | |
- name: "Run tests for ${{ matrix.python-version }}" | |
run: hatch run test:no-cov | |
docs: | |
name: Documentation | |
runs-on: "ubuntu-latest" | |
strategy: | |
fail-fast: false | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-python@v4 | |
with: | |
python-version: 3.11 | |
- name: "Install doc dependencies" | |
run: | | |
set -xe | |
python -m pip install --upgrade pip | |
pip install hatch | |
hatch env create docs | |
- name: "Build docs" | |
run: hatch run docs:build-ci |