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
2 changes: 1 addition & 1 deletion .github/workflows/tox.yml
Original file line number Diff line number Diff line change
Expand Up @@ -293,7 +293,7 @@ jobs:
path: ${{ matrix.artifact-path }}
archive: ${{ matrix.artifact-archive }}
if-no-files-found: ${{ matrix.artifact-if-no-files-found }}
if-include-hidden-files: ${{ matrix.artifact-include-hidden-files }}
include-hidden-files: ${{ matrix.artifact-include-hidden-files }}

- if: ${{ (success() || failure()) && matrix.pytest-results-summary == 'true' && matrix.pytest == 'true' }}
uses: test-summary/action@31493c76ec9e7aa675f1585d3ed6f1da69269a86 # v2.4
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/update_tag.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,5 +11,7 @@ jobs:
update-majorver:
name: Update Major Version Tag
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- uses: nowactions/update-majorver@f2014bbbba95b635e990ce512c5653bd0f4753fb # v1.1.2
66 changes: 65 additions & 1 deletion docs/source/tox.rst
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,6 @@ Example:
- linux: py39
- macos: py38-docs
name: build_docs
- windows: py310-conda

The name of the GitHub Actions job can be changed with the ``name``
option as shown above. By default, ``name`` will be the name of the tox
Expand Down Expand Up @@ -545,6 +544,71 @@ 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@v1
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@v1
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@v1
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
Loading