Skip to content

Run the full test matrix before publishing a release - #164

Merged
diazona merged 2 commits into
pytest-dev:mainfrom
TOMASEZARATE:full-release-testing
Dec 2, 2026
Merged

diazona merged 2 commits into
pytest-dev:mainfrom
TOMASEZARATE:full-release-testing

Conversation

@TOMASEZARATE

Copy link
Copy Markdown
Contributor

Follow-up to #163, as discussed there. This builds on that branch, so until #163 is merged the diff includes its commit too.

Pushes and pull requests keep the reduced set of environments from #163, but before a release goes to PyPI the full matrix runs again (CPython 3.7-3.15 and PyPy 3.7-3.12, both with and without smtp, plus the minimum pytest versions), and building and publishing only happen if it passes. The layout follows setuptools-pyproject-migration:

  • .github/workflows/test.yml is a reusable workflow that runs tox for a given Python, OS and set of environments.
  • tests.yml calls it with the reduced matrix on push and pull requests.
  • release.yml calls it with the full matrix, and the build and publish jobs depend on it. It can also be started manually to run the full suite and build the packages without publishing.
  • tox.ini keeps the reduced default envlist and adds a full label with the previous one, so tox -m full runs everything locally.

Checked the workflows with actionlint and ran tox -e py and tox -e py-smtp locally.

I used an AI assistant (Cursor Agent with Grok 4.7) while writing this change. I reviewed the code myself, and the commit has an Assisted-by trailer.

Assisted-by: Cursor Agent with Grok 4.7
Assisted-by: Cursor Agent with Grok 4.7
@diazona

diazona commented Dec 2, 2026

Copy link
Copy Markdown
Contributor

Sorry, I thought I had posted a comment here a couple days ago but I realized I forgot to submit it at the time 🤦 But on a second look, the comment doesn't really matter, so I'm good with this as is.


For future reference, what I was thinking about was whether it makes sense to be able to run this manually. Specifically, when running the release workflow manually, I would think it'd make sense to push to test PyPI (though obviously not real PyPI). However, I think test PyPI doesn't accept local version identifiers in version numbers, so it wouldn't be possible to do a test publish unless it was triggered by a tag or release.

If we want a workflow that builds packages and runs tests on every version, that seems like it'd make more sense as an option on the main testing workflow. Though I kind of lean toward thinking it's not all that necessary to have that option available in CI runs.

Of course the same considerations would apply to setuptools-pyproject-migration as well; this is probably something I just didn't think about when I was working on that project.

@diazona
diazona merged commit 1f798d0 into pytest-dev:main Dec 2, 2026
8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants