Skip to content

Commit ccd2f9f

Browse files
authored
Docs and a bugfix (#381)
* Add docs for filling * Fix include hidden files arg * Hopefully fix update majorver
1 parent fc355c8 commit ccd2f9f

3 files changed

Lines changed: 68 additions & 2 deletions

File tree

.github/workflows/tox.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -293,7 +293,7 @@ jobs:
293293
path: ${{ matrix.artifact-path }}
294294
archive: ${{ matrix.artifact-archive }}
295295
if-no-files-found: ${{ matrix.artifact-if-no-files-found }}
296-
if-include-hidden-files: ${{ matrix.artifact-include-hidden-files }}
296+
include-hidden-files: ${{ matrix.artifact-include-hidden-files }}
297297

298298
- if: ${{ (success() || failure()) && matrix.pytest-results-summary == 'true' && matrix.pytest == 'true' }}
299299
uses: test-summary/action@31493c76ec9e7aa675f1585d3ed6f1da69269a86 # v2.4

.github/workflows/update_tag.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,5 +11,7 @@ jobs:
1111
update-majorver:
1212
name: Update Major Version Tag
1313
runs-on: ubuntu-latest
14+
permissions:
15+
contents: write
1416
steps:
1517
- uses: nowactions/update-majorver@f2014bbbba95b635e990ce512c5653bd0f4753fb # v1.1.2

docs/source/tox.rst

Lines changed: 65 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,6 @@ Example:
7878
- linux: py39
7979
- macos: py38-docs
8080
name: build_docs
81-
- windows: py310-conda
8281
8382
The name of the GitHub Actions job can be changed with the ``name``
8483
option as shown above. By default, ``name`` will be the name of the tox
@@ -545,6 +544,71 @@ same repository, or when using a non-standard project layout.
545544
envs: |
546545
- linux: py312
547546
547+
fill
548+
^^^^
549+
550+
Automatically add tox environments for each Python version currently supported
551+
by your package. The supported versions are determined by reading the
552+
``requires-python`` field from your package's ``pyproject.toml`` file
553+
(conforming to PEP 621) and cross-referencing with currently maintained Python
554+
versions from https://endoflife.date.
555+
556+
Default is ``false``.
557+
558+
.. code:: yaml
559+
560+
uses: OpenAstronomy/github-actions-workflows/.github/workflows/tox.yml@v1
561+
with:
562+
fill: true
563+
envs: |
564+
- linux: pep8
565+
pytest: false
566+
567+
In the above example, if your package's ``pyproject.toml`` specifies
568+
``requires-python = ">=3.10"``, and Python 3.10, 3.11, 3.12, and 3.13 are
569+
currently maintained, the workflow will automatically add ``py310``, ``py311``,
570+
``py312``, and ``py313`` environments on Linux in addition to the ``pep8``
571+
environment.
572+
573+
fill_platforms
574+
^^^^^^^^^^^^^^
575+
576+
Platforms to use when generating environments with ``fill``. This is a
577+
comma-separated list of platforms. Default is ``linux`` only.
578+
579+
.. code:: yaml
580+
581+
uses: OpenAstronomy/github-actions-workflows/.github/workflows/tox.yml@v1
582+
with:
583+
fill: true
584+
fill_platforms: linux,macos,windows
585+
envs: |
586+
- linux: pep8
587+
pytest: false
588+
589+
This will create tox environments for each supported Python version on all
590+
three platforms.
591+
592+
fill_factors
593+
^^^^^^^^^^^^
594+
595+
Tox factors to add to the automatically generated environments from ``fill``.
596+
This is a comma-separated list of factors. Default is none.
597+
598+
.. code:: yaml
599+
600+
uses: OpenAstronomy/github-actions-workflows/.github/workflows/tox.yml@v1
601+
with:
602+
fill: true
603+
fill_factors: test,cov
604+
envs: |
605+
- linux: pep8
606+
pytest: false
607+
608+
If your package supports Python 3.11 and 3.12, this will generate environments
609+
like ``py311-test-cov`` and ``py312-test-cov`` instead of just ``py311`` and
610+
``py312``.
611+
548612
Secrets
549613
~~~~~~~
550614

0 commit comments

Comments
 (0)