-
Notifications
You must be signed in to change notification settings - Fork 1
40 lines (37 loc) · 889 Bytes
/
build.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
name: Build
on: push
permissions:
contents: read
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
python-version:
- "3.9"
- "3.10"
- "3.11"
- "3.12"
fail-fast: false
env:
PYTHONDEVMODE: 1
steps:
- uses: actions/checkout@v4
# Install toolchain.
- uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- run: pipx install poetry
# Install dependencies.
- run: poetry check
- run: poetry check --lock
- run: poetry env use "python${{ matrix.python-version }}"
- run: poetry install
# Run checks.
- run: poetry run ruff check
- run: poetry run ruff format --check
- run: poetry run mypy
# Run tests.
- run: poetry run pytest
# Build docs.
- run: poetry run sphinx-build -W docs docs/_build