Skip to content

Commit 07a3a38

Browse files
committed
More actions improvements
1 parent 9c3d429 commit 07a3a38

File tree

3 files changed

+43
-74
lines changed

3 files changed

+43
-74
lines changed

.github/workflows/code_quality.yml

Lines changed: 0 additions & 74 deletions
Original file line numberDiff line numberDiff line change
@@ -40,77 +40,3 @@ jobs:
4040

4141
- name: Type Checking (Pyright)
4242
run: uv run make.py pyright
43-
44-
# Prepare the Pull Request Payload artifact. If this fails,
45-
# we fail silently using the `continue-on-error` option. It's
46-
# nice if this succeeds, but if it fails for any reason, it
47-
# does not mean that our lint-test checks failed.
48-
- name: Prepare Pull Request Payload artifact
49-
id: prepare-artifact
50-
if: github.event_name == 'pull_request'
51-
continue-on-error: true
52-
run: cat $GITHUB_EVENT_PATH | jq '.pull_request' > pull_request_payload.json
53-
54-
# This only makes sense if the previous step succeeded. To
55-
# get the original outcome of the previous step before the
56-
# `continue-on-error` conclusion is applied, we use the
57-
# `.outcome` value. This step also fails silently.
58-
- name: Upload a Build Artifact
59-
if: steps.prepare-artifact.outcome == 'success'
60-
continue-on-error: true
61-
uses: actions/upload-artifact@v4
62-
with:
63-
name: pull-request-payload
64-
path: pull_request_payload.json
65-
66-
builddoc:
67-
68-
name: Documentation build test
69-
runs-on: ${{ matrix.os }}
70-
71-
strategy:
72-
matrix:
73-
os: [ubuntu-latest]
74-
# python-version in must be kept in sync with .readthedocs.yaml
75-
python-version: ['3.10'] # July 2024 | Match our contributor dev version; see pyproject.toml
76-
architecture: ['x64']
77-
78-
steps:
79-
- uses: actions/checkout@v4
80-
- name: setup
81-
uses: actions/setup-python@v5
82-
with:
83-
python-version: ${{ matrix.python-version }}
84-
architecture: ${{ matrix.architecture }}
85-
86-
- name: dependencies
87-
run: |
88-
python -m pip install -U pip wheel setuptools
89-
- name: wheel
90-
id: wheel
91-
run: |
92-
python -m pip install -e .[dev]
93-
- name: build-docs
94-
run: |
95-
sphinx-build doc build -W
96-
# Prepare the Pull Request Payload artifact. If this fails,
97-
# we fail silently using the `continue-on-error` option. It's
98-
# nice if this succeeds, but if it fails for any reason, it
99-
# does not mean that our lint-test checks failed.
100-
- name: Prepare Pull Request Payload artifact
101-
id: prepare-artifact
102-
if: always() && github.event_name == 'pull_request'
103-
continue-on-error: true
104-
run: cat $GITHUB_EVENT_PATH | jq '.pull_request' > pull_request_payload.json
105-
106-
# This only makes sense if the previous step succeeded. To
107-
# get the original outcome of the previous step before the
108-
# `continue-on-error` conclusion is applied, we use the
109-
# `.outcome` value. This step also fails silently.
110-
- name: Upload a Build Artifact
111-
if: always() && steps.prepare-artifact.outcome == 'success'
112-
continue-on-error: true
113-
uses: actions/upload-artifact@v4
114-
with:
115-
name: pull-request-payload
116-
path: pull_request_payload.json

.github/workflows/docs.yml

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
# Builds the doc in PRs
2+
3+
on:
4+
push:
5+
branches: [development, maintenance]
6+
pull_request:
7+
branches: [development, maintenance]
8+
workflow_dispatch:
9+
10+
jobs:
11+
12+
build:
13+
name: Build Documentation
14+
runs-on: ubuntu-latest
15+
16+
steps:
17+
- uses: actions/checkout@v5
18+
19+
- name: Setup Python
20+
uses: actions/setup-python@v5
21+
with:
22+
python-version: '3.10'
23+
24+
- name: Install UV
25+
uses: astral-sh/setup-uv@v7
26+
with:
27+
enable-cache: true
28+
29+
- name: Sync UV Project
30+
run: uv sync
31+
32+
- name: build-docs
33+
run: uv run make.py docs-full

make.py

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -207,6 +207,16 @@ def serve():
207207
)
208208

209209

210+
@app.command(rich_help_panel="Docs")
211+
def docs_full():
212+
"""
213+
Build the documentation fully and error on warnings. This is what is checked in CI.
214+
"""
215+
run_doc([SPHINX_BUILD, DOC_DIR, "build", "-W"])
216+
print()
217+
print("Build finished")
218+
219+
210220
@app.command(rich_help_panel="Docs")
211221
def linkcheck():
212222
"""

0 commit comments

Comments
 (0)