Skip to content

Commit c22eb03

Browse files
committed
ci: add CI and docs deployment workflows
1 parent 82c9794 commit c22eb03

2 files changed

Lines changed: 74 additions & 0 deletions

File tree

.github/workflows/docs.yml

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
name: Docs
2+
3+
on:
4+
push:
5+
branches: [main]
6+
paths:
7+
- "docs/**"
8+
- "mkdocs.yml"
9+
- "src/**"
10+
- ".github/workflows/docs.yml"
11+
12+
permissions:
13+
contents: write
14+
15+
jobs:
16+
deploy:
17+
runs-on: ubuntu-latest
18+
steps:
19+
- uses: actions/checkout@v4
20+
with:
21+
fetch-depth: 0
22+
- uses: actions/setup-python@v5
23+
with:
24+
python-version: "3.12"
25+
- name: Install
26+
run: |
27+
python -m pip install --upgrade pip
28+
pip install -e ".[docs]"
29+
- name: Deploy
30+
run: mkdocs gh-deploy --force --clean

.github/workflows/test.yml

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
name: CI
2+
3+
on:
4+
push:
5+
branches: [main]
6+
pull_request:
7+
branches: [main]
8+
9+
jobs:
10+
lint:
11+
runs-on: ubuntu-latest
12+
steps:
13+
- uses: actions/checkout@v4
14+
- uses: actions/setup-python@v5
15+
with:
16+
python-version: "3.12"
17+
- name: Install
18+
run: |
19+
python -m pip install --upgrade pip
20+
pip install -e ".[dev]"
21+
- name: Ruff check
22+
run: ruff check .
23+
- name: Ruff format
24+
run: ruff format --check .
25+
- name: Mypy
26+
run: mypy src/
27+
28+
test:
29+
runs-on: ubuntu-latest
30+
strategy:
31+
fail-fast: false
32+
matrix:
33+
python-version: ["3.9", "3.10", "3.11", "3.12", "3.13"]
34+
steps:
35+
- uses: actions/checkout@v4
36+
- uses: actions/setup-python@v5
37+
with:
38+
python-version: ${{ matrix.python-version }}
39+
- name: Install
40+
run: |
41+
python -m pip install --upgrade pip
42+
pip install -e ".[dev]"
43+
- name: Pytest
44+
run: pytest

0 commit comments

Comments
 (0)