-
Notifications
You must be signed in to change notification settings - Fork 5
64 lines (59 loc) · 1.69 KB
/
Copy pathci.yml
File metadata and controls
64 lines (59 loc) · 1.69 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
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
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: '3.10' # the supported floor
- 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@v4
- uses: actions/setup-python@v5
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@v4
with:
fetch-depth: 0
- uses: actions/setup-python@v5
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