Skip to content

Commit 3592058

Browse files
committed
Add actions for notebook clearing, building docs, and running unit tests
1 parent 5e88bcd commit 3592058

File tree

4 files changed

+133
-1
lines changed

4 files changed

+133
-1
lines changed

.github/workflows/build-docs.yml

Lines changed: 60 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,60 @@
1+
name: CI - Build docs
2+
3+
on:
4+
push:
5+
branches: [ main ]
6+
paths:
7+
- "docs/**"
8+
- "**/*.py"
9+
- ".github/workflows/build-docs.yml"
10+
pull_request:
11+
paths:
12+
- "docs/**"
13+
- ".github/workflows/build-docs.yml"
14+
15+
concurrency:
16+
group: ${{ github.workflow }}-${{ github.ref }}
17+
cancel-in-progress: true
18+
19+
jobs:
20+
docs:
21+
name: Build docs
22+
runs-on: ubuntu-latest
23+
steps:
24+
- uses: actions/checkout@v4
25+
26+
- name: Set up Python
27+
uses: actions/setup-python@v5
28+
with:
29+
python-version: "3.13"
30+
cache: "pip"
31+
32+
- name: Install uv
33+
run: python -m pip install -U uv
34+
35+
- name: Install just
36+
run: uv tool install just
37+
38+
- name: Build docs
39+
run: just docs
40+
41+
doctest:
42+
name: Run doctests
43+
runs-on: ubuntu-latest
44+
steps:
45+
- uses: actions/checkout@v4
46+
47+
- name: Set up Python
48+
uses: actions/setup-python@v5
49+
with:
50+
python-version: "3.13"
51+
cache: "pip"
52+
53+
- name: Install uv
54+
run: python -m pip install -U uv
55+
56+
- name: Install just
57+
run: uv tool install just
58+
59+
- name: Run doctests
60+
run: just doctest

.github/workflows/ci-lint-typecheck.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ jobs:
5151
- name: Install uv
5252
run: python -m pip install -U uv
5353

54-
- name: Sync typecheck deps (locked)
54+
- name: uv sync
5555
run: uv sync --dev --frozen
5656

5757
- name: Run pyrefly
Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
name: CI - Clear notebook outputs
2+
3+
on:
4+
push:
5+
branches: [ main ]
6+
paths:
7+
- "**/*.ipynb"
8+
- ".github/workflows/clear-notebooks.yml"
9+
pull_request:
10+
paths:
11+
- "**/*.ipynb"
12+
- ".github/workflows/clear-notebooks.yml"
13+
14+
concurrency:
15+
group: ${{ github.workflow }}-${{ github.ref }}
16+
cancel-in-progress: true
17+
18+
jobs:
19+
nbconvert:
20+
name: Clear notebooks
21+
runs-on: ubuntu-latest
22+
steps:
23+
- uses: actions/checkout@v4
24+
25+
- name: Set up Python
26+
uses: actions/setup-python@v5
27+
with:
28+
python-version: "3.13"
29+
cache: "pip"
30+
31+
- name: Install uv
32+
run: python -m pip install -U uv
33+
34+
- name: uv sync
35+
run: uv sync --dev --frozen
36+
37+
- name: nbconvert
38+
run: uv run jupyter nbconvert --clear-output **.ipynb

.github/workflows/unit-tests.yml

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
name: Run unit tests
2+
3+
on:
4+
push:
5+
branches: [ main ]
6+
paths:
7+
- "**/*.py"
8+
- ".github/workflows/unit-tests.yml"
9+
10+
concurrency:
11+
group: ${{ github.workflow }}-${{ github.ref }}
12+
cancel-in-progress: true
13+
14+
jobs:
15+
nbconvert:
16+
name: Run unit tests
17+
runs-on: ubuntu-latest
18+
steps:
19+
- uses: actions/checkout@v4
20+
21+
- name: Set up Python
22+
uses: actions/setup-python@v5
23+
with:
24+
python-version: "3.13"
25+
cache: "pip"
26+
27+
- name: Install uv
28+
run: python -m pip install -U uv
29+
30+
- name: uv sync
31+
run: uv sync
32+
33+
- name: pytest
34+
run: uv run pytest

0 commit comments

Comments
 (0)