Skip to content
Closed
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
20 changes: 19 additions & 1 deletion .github/workflows/tox.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,16 @@ jobs:
"minLength": 1
}
},
"tox-plugins": {
"description": "A list of tox plugins to install. By default, 'tox-uv' and 'tox-gh' are installed.",
"type": "array",
"minItems": 1,
"items": {
"type": "string",
"minLength": 1
},
"default": ["tox-uv", "tox-gh"]
},
"cpythons": {
"description": "A list of CPython interpreter versions. Typically, the *last version* listed will be the default Python interpreter when 'python' is invoked, and will be the version used when installing and executing tox.",
"type": "array",
Expand Down Expand Up @@ -293,6 +303,9 @@ jobs:
skip_patterns.append(pattern)
config["tox-skip-environments-regex"] = "|".join(skip_patterns)

# load tox plugins, with default
config["tox-plugins"] = config.get("tox-plugins", ["tox-uv", "tox-gh"])


def main() -> None:
# Load
Expand Down Expand Up @@ -380,7 +393,12 @@ jobs:
run: |
python -m venv .venv
${{ env.venv-path }}/python -m pip install --upgrade pip setuptools wheel
${{ env.venv-path }}/pip install tox tox-uv
${{ env.venv-path }}/pip install tox

- name: "Install tox plugins"
if: "steps.restore-cache.outputs.cache-hit == false && fromJSON(env.tox-config).tox-plugins"
run: |
${{ env.venv-path }}/pip install ${{ join(fromJSON(env.tox-config).tox-plugins, ' ') }}

- name: "Setup Pythons (requested)"
if: "fromJSON(env.tox-config).python-versions-required != fromJSON(env.tox-config).python-versions-requested"
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
Added
-----

- The tox workflow now defaults to installing the `tox-gh` plugin
- Users can override the list of tox plugins to install using the `tox-plugins` config key. The default is `["tox-uv", "tox-gh"]`.