Skip to content

Conversation

@hugovk
Copy link
Member

@hugovkhugovk commented Nov 26, 2025

The earlier approach was something like:

matrix: branch: ["main", "3.14", "3.13", "3.12"] ... python-version: ${{matrix.branch == 'main' && '3.15' || matrix.branch }} ... --branches ${{matrix.branch }}

Which do you prefer?


📚 Documentation preview 📚: https://python-docs-theme-previews--282.org.readthedocs.build/

@hugovkhugovk added enhancement github_actions Pull requests that update GitHub Actions code labels Nov 26, 2025
Copy link
Member

@AA-TurnerAA-Turner left a comment

Choose a reason for hiding this comment

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

If it were me, I'd probably duplicate the jobs -- one for released & one for in-development.

Comment on lines +16 to +18
include:
- python-version: "3.15"
branch: "main"
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
MemberAuthor

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!

Comment on lines +44 to +45
--branches ${{matrix.branch || matrix.python-version }}
${{matrix.branch == 'main' && '--select-output no-html' || '' }}
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

@hugovkhugovk merged commit 4e36f99 into python:mainNov 28, 2025
15 checks passed
@hugovkhugovk deleted the add-3.15 branch November 28, 2025 10:38
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancementgithub_actionsPull requests that update GitHub Actions code

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants

@hugovk@AA-Turner@ezio-melotti