Skip to content
Merged
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
13 changes: 8 additions & 5 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,15 @@ jobs:
strategy:
fail-fast: false
matrix:
branch: ["3.14", "3.13", "3.12"]
python-version: ["3.15", "3.14", "3.13", "3.12"]
include:
- python-version: "3.15"
branch: "main"
Comment on lines +16 to +18
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A possible improvement is to compute the branch and extra opts once and assign them to env vars:

Suggested change
include:
- python-version: "3.15"
branch: "main"
include:
- python-version: "3.15"
branch: "main"
extra_opts: '--select-output no-html'
env:
# set the branch name to either 'main' or the version number
BRANCH: ${{ matrix.branch || matrix.version }}
# define optional extra options if specified
EXTRA_OPTS: ${{ matrix.extra_opts || '' }}

This keeps all the data and logic closer and avoids duplication. However we only need the branch and the extra opts once in the workflow, so your less-verbose solution is fine too.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, that is quite a bit more verbose, let's stick with the current version. Thanks!

steps:
- uses: actions/checkout@v5
- uses: actions/setup-python@v6
with:
python-version: ${{ matrix.branch }}
python-version: ${{ matrix.python-version }}
allow-prereleases: true
cache: pip
- name: Clone docsbuild scripts
Expand All @@ -38,16 +41,16 @@ jobs:
--skip-cache-invalidation
--theme "$(pwd)"
--languages en
--branches ${{ matrix.branch }}
${{ matrix.branch == '3.14' && '--select-output no-html' || '' }}
--branches ${{ matrix.branch || matrix.python-version }}
${{ matrix.branch == 'main' && '--select-output no-html' || '' }}
Comment on lines +44 to +45
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
--branches ${{ matrix.branch || matrix.python-version }}
${{ matrix.branch == 'main' && '--select-output no-html' || '' }}
--branches env.BRANCH env.EXTRA_OPTS

- name: Show logs
if: failure()
run: |
cat ./logs/docsbuild.log
- name: Upload
uses: actions/upload-artifact@v5
with:
name: doc-html-${{ matrix.branch }}
name: doc-html-${{ matrix.python-version }}
path: www/

translations:
Expand Down
3 changes: 2 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ classifiers = [
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: 3.13",
"Programming Language :: Python :: 3.14",
"Programming Language :: Python :: 3.15",
"Topic :: Documentation",
"Topic :: Software Development :: Documentation",
]
Expand Down Expand Up @@ -70,4 +71,4 @@ lint.ignore = [
lint.isort.required-imports = [ "from __future__ import annotations" ]

[tool.pyproject-fmt]
max_supported_python = "3.14"
max_supported_python = "3.15"
Loading