diff --git a/.github/workflows/tox.yml b/.github/workflows/tox.yml index c9f1714..959975a 100644 --- a/.github/workflows/tox.yml +++ b/.github/workflows/tox.yml @@ -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 diff --git a/.github/workflows/update_tag.yml b/.github/workflows/update_tag.yml index cfa4b3c..caa3ddf 100644 --- a/.github/workflows/update_tag.yml +++ b/.github/workflows/update_tag.yml @@ -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 diff --git a/docs/source/tox.rst b/docs/source/tox.rst index 0ff9dbb..6b1517d 100644 --- a/docs/source/tox.rst +++ b/docs/source/tox.rst @@ -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 @@ -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 ~~~~~~~