Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 30 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,3 +24,33 @@ jobs:
uses: beeware/.github/.github/workflows/pre-commit-run.yml@main
with:
pre-commit-source: "--group pre-commit"

lint:
needs: [ pre-commit ]
runs-on: ubuntu-latest
timeout-minutes: 5
steps:
- name: Checkout
uses: actions/checkout@v6.0.2
with:
fetch-depth: 1

- name: Set up Python
uses: actions/setup-python@v6.2.0
with:
python-version: "3.X"
cache: pip
cache-dependency-path: |
pyproject.toml
.pre-commit-config.yaml
- name: Install system dependencies
run: |
sudo apt-get install aspell aspell-en
- name: Update pip
run: python -m pip install -U pip

- name: Install Tox
run: python -m pip install --group 'tox-uv'

- name: Perform lint checks
run: python -m tox -e docs-lint
8 changes: 3 additions & 5 deletions .readthedocs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,16 +9,14 @@ version: 2
build:
os: ubuntu-24.04
tools:
# Docs are always built on Python 3.12. See also the tox config.
python: "3.12"
# Docs are always built on Python 3.13. See also the tox config.
python: "3.13"
jobs:
post_checkout:
- git fetch --unshallow
pre_install:
- python -m pip install --upgrade pip
- python -m pip install --group 'tox-uv'
pre_build:
- python -m tox -e docs-lint
build:
html:
- python -m tox -e docs-$READTHEDOCS_LANGUAGE -- --output=$READTHEDOCS_OUTPUT/html/
- python -m tox -e docs-all -- --output=$READTHEDOCS_OUTPUT/html/
9 changes: 5 additions & 4 deletions tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ envlist = docs-lint,docs-all
docs_dir = {tox_root}{/}docs{/}en

[testenv:docs{,-lint,-translate,-all,-live,-en,-de,-es,-fr,-it,-pt,-zh-cn,-zh-tw}]
# Docs are always built on Python 3.12. See also the RTD config.
base_python = py312
# Docs are always built on Python 3.13. See also the RTD config.
base_python = py313
skip_install = true
passenv =
DEEPL_API_KEY
Expand All @@ -18,8 +18,6 @@ commands:
translate : update_machine_translations --soft-fail de es fr it pt zh_CN zh_TW
lint : markdown-checker --dir {[docs]docs_dir} --func check_broken_urls
lint : pyspelling
live : live_serve_en {posargs} --port=8041
all : build_md_translations {posargs} en de es fr it pt zh_CN zh_TW
en : build_md_translations {posargs} en
de : build_md_translations {posargs} de
es : build_md_translations {posargs} es
Expand All @@ -28,3 +26,6 @@ commands:
pt : build_md_translations {posargs} pt
zh-cn : build_md_translations {posargs} zh_CN
zh-tw : build_md_translations {posargs} zh_TW
all : build_md_translations {posargs} en de es fr it pt zh_CN zh_TW
serve : python -m http.server -d _build/html 8041
live : live_serve_en {posargs} --port=8041