Skip to content
Open
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
7 changes: 3 additions & 4 deletions .github/workflows/test_tox.yml
Original file line number Diff line number Diff line change
Expand Up @@ -68,14 +68,13 @@ jobs:
posargs: 'PyPy'
pytest: false

test_supported_pythons:
test_python_version_glob:
uses: ./.github/workflows/tox.yml
with:
envs: |
- linux: pep8
- linux: py3
fill: true
fill_platforms: linux,macos
- linux: py3*
- macos: py31*
pytest: false

test_libraries:
Expand Down
30 changes: 3 additions & 27 deletions .github/workflows/tox.yml

Large diffs are not rendered by default.

72 changes: 7 additions & 65 deletions docs/source/tox.rst
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,13 @@ environment.
If the Python version includes a ``t`` suffix, such as ``py313t``, then
a free-threaded Python interpreter will be used.

Additionally, the Python version can include glob syntax (i.e. `py3*`) to expand into all supported versions of Python (respecting ``project.requires-python`` in ``pyproject.toml`` as conforming with PEP621).

For example:
- ``py*`` for all supported versions of Python (from https://endoflife.date)
- ``py3*`` for all supported minor versions of Python 3
- ``py31*`` for all supported versions of Python between ``3.10`` and ``3.20``

libraries
^^^^^^^^^

Expand Down Expand Up @@ -544,71 +551,6 @@ same repository, or when using a non-standard project layout.
envs: |
- linux: py312

fill
^^^^

Automatically add tox environments for each Python version currently supported
by your package. The supported versions are determined by reading the
``requires-python`` field from your package's ``pyproject.toml`` file
(conforming to PEP 621) and cross-referencing with currently maintained Python
versions from https://endoflife.date.

Default is ``false``.

.. code:: yaml

uses: OpenAstronomy/github-actions-workflows/.github/workflows/tox.yml@v2
with:
fill: true
envs: |
- linux: pep8
pytest: false

In the above example, if your package's ``pyproject.toml`` specifies
``requires-python = ">=3.10"``, and Python 3.10, 3.11, 3.12, and 3.13 are
currently maintained, the workflow will automatically add ``py310``, ``py311``,
``py312``, and ``py313`` environments on Linux in addition to the ``pep8``
environment.

fill_platforms
^^^^^^^^^^^^^^

Platforms to use when generating environments with ``fill``. This is a
comma-separated list of platforms. Default is ``linux`` only.

.. code:: yaml

uses: OpenAstronomy/github-actions-workflows/.github/workflows/tox.yml@v2
with:
fill: true
fill_platforms: linux,macos,windows
envs: |
- linux: pep8
pytest: false

This will create tox environments for each supported Python version on all
three platforms.

fill_factors
^^^^^^^^^^^^

Tox factors to add to the automatically generated environments from ``fill``.
This is a comma-separated list of factors. Default is none.

.. code:: yaml

uses: OpenAstronomy/github-actions-workflows/.github/workflows/tox.yml@v2
with:
fill: true
fill_factors: test,cov
envs: |
- linux: pep8
pytest: false

If your package supports Python 3.11 and 3.12, this will generate environments
like ``py311-test-cov`` and ``py312-test-cov`` instead of just ``py311`` and
``py312``.

Secrets
~~~~~~~

Expand Down
123 changes: 0 additions & 123 deletions tools/supported_pythons.py

This file was deleted.

Loading
Loading