Repository navigation
72 lines (67 loc) · 2.08 KB
/
Copy pathci.yml
File metadata and controls
72 lines (67 loc) · 2.08 KB
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
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
name: ci
# The wrapper's quality gates (pytest, ruff, basedpyright) plus the strict
# documentation build, then gh-pages publication on push to main - the same
# verify/deploy split as the engine repo's docs workflow.
on:
push:
branches: [main]
pull_request:
workflow_dispatch:
permissions:
contents: read
jobs:
test:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
# the supported floor and the newest release the package declares (pyproject.toml): the
# floor catches what a user on it would hit (a typing stub, a missing method), the newest the
# deprecations ahead; every gate runs on both
python-version: ['3.11', '3.14']
name: test (python ${{ matrix.python-version }})
steps:
- uses: actions/checkout@v7
- uses: actions/setup-python@v7
with:
python-version: ${{ matrix.python-version }}
- name: Install package with dev extras
run: pip install -e '.[dev]' basedpyright
- name: Lint (ruff)
run: ruff check .
- name: Type check (basedpyright)
run: basedpyright
- name: Unit tests
run: pytest -q
docs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v7
- uses: actions/setup-python@v7
with:
python-version: '3.x'
- name: Install MkDocs
run: pip install mkdocs-material
- name: Build docs (strict)
run: mkdocs build --strict
deploy-docs:
# Publish to gh-pages only on push to main or manual dispatch, after both gates pass.
if: github.event_name != 'pull_request'
needs: [test, docs]
runs-on: ubuntu-latest
permissions:
contents: write
concurrency:
group: docs-deploy
cancel-in-progress: false
steps:
- uses: actions/checkout@v7
with:
fetch-depth: 0
- uses: actions/setup-python@v7
with:
python-version: '3.x'
- name: Install MkDocs
run: pip install mkdocs-material
- name: Build (strict) and deploy to gh-pages
run: mkdocs gh-deploy --force --strict