From e476d59b854fabcd21e7d83673a8ce2a87ba511a Mon Sep 17 00:00:00 2001 From: Russell Keith-Magee Date: Fri, 27 Feb 2026 10:51:43 +0800 Subject: [PATCH] Build all languages in a single pass. --- .github/workflows/ci.yml | 30 ++++++++++++++++++++++++++++++ .readthedocs.yaml | 8 +++----- tox.ini | 9 +++++---- 3 files changed, 38 insertions(+), 9 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 1d5a32f..9537370 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -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 diff --git a/.readthedocs.yaml b/.readthedocs.yaml index 18fd338..ab09699 100644 --- a/.readthedocs.yaml +++ b/.readthedocs.yaml @@ -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/ diff --git a/tox.ini b/tox.ini index 9556473..6d4f36a 100644 --- a/tox.ini +++ b/tox.ini @@ -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 @@ -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 @@ -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