| 1 |
name: CI |
| 2 |
on: |
| 3 |
push: |
| 4 |
pull_request: |
| 5 |
schedule: |
| 6 |
- cron: '0 6 * * 6' |
| 7 |
defaults: |
| 8 |
run: |
| 9 |
shell: bash |
| 10 |
jobs: |
| 11 |
test: |
| 12 |
strategy: |
| 13 |
fail-fast: false |
| 14 |
matrix: |
| 15 |
include: |
| 16 |
- python: '^3.13' |
| 17 |
os: ubuntu-latest |
| 18 |
- python: '3.13' |
| 19 |
os: macos-latest |
| 20 |
- python: '3.12' |
| 21 |
os: windows-latest |
| 22 |
- python: '3.11' |
| 23 |
os: ubuntu-latest |
| 24 |
- python: '3.10' |
| 25 |
os: macos-latest |
| 26 |
- python: '3.9' |
| 27 |
os: windows-latest |
| 28 |
- python: '3.9' |
| 29 |
os: ubuntu-latest |
| 30 |
versions: minimal |
| 31 |
runs-on: ${{matrix.os}} |
| 32 |
steps: |
| 33 |
- name: Download source |
| 34 |
uses: actions/checkout@v4 |
| 35 |
- name: Install Python |
| 36 |
uses: actions/setup-python@v5 |
| 37 |
with: |
| 38 |
python-version: ${{matrix.python}} |
| 39 |
- name: Pin to lowest versions |
| 40 |
if: matrix.versions == 'minimal' |
| 41 |
run: | |
| 42 |
sed -i -E 's/#min //; s/\b >=([0-9])/ ==\1/' pyproject.toml |
| 43 |
- name: Install Hatch |
| 44 |
run: | |
| 45 |
pip install hatch |
| 46 |
- name: Install dependencies |
| 47 |
run: | |
| 48 |
hatch run test:pip freeze |
| 49 |
- name: Run tests |
| 50 |
run: | |
| 51 |
hatch run test:test |
| 52 |
style: |
| 53 |
runs-on: ubuntu-latest |
| 54 |
steps: |
| 55 |
- name: Download source |
| 56 |
uses: actions/checkout@v4 |
| 57 |
- name: Install Python |
| 58 |
uses: actions/setup-python@v5 |
| 59 |
with: |
| 60 |
python-version: '3.12' |
| 61 |
- name: Install Hatch |
| 62 |
run: | |
| 63 |
pip install hatch |
| 64 |
- name: Install dependencies |
| 65 |
run: | |
| 66 |
hatch run style:pip freeze |
| 67 |
hatch run types:pip freeze |
| 68 |
- name: Check style |
| 69 |
if: always() |
| 70 |
run: | |
| 71 |
hatch run style:check |
| 72 |
- name: Check types |
| 73 |
if: always() |
| 74 |
run: | |
| 75 |
hatch run types:check |