Skip to content

Commit 6e46fe0

Browse files
authored
Make scope in generate tox matrix optional (#41)
1 parent 037e21d commit 6e46fe0

File tree

1 file changed

+12
-10
lines changed

1 file changed

+12
-10
lines changed

.github/actions/generate-tox-ansible-matrix/action.yaml

Lines changed: 12 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,9 @@ description: Generate a tox ansible matrix for the given scope.
44

55
inputs:
66
scope:
7-
description: Scope to generate matrix for.
8-
required: true
7+
description: "Scope to generate matrix for. Allowed values: all, sanity, unit, integration"
8+
required: false
9+
default: all
910

1011
outputs:
1112
envlist:
@@ -15,6 +16,10 @@ outputs:
1516
runs:
1617
using: composite
1718
steps:
19+
- uses: actions/checkout@v4
20+
with:
21+
submodules: true
22+
1823
# `required: true` seems to be no-op for actions?
1924
# https://github.com/actions/runner/issues/1070
2025
- name: Fail early if no scope was provided for matrix generation
@@ -24,10 +29,10 @@ runs:
2429
script: |
2530
core.setFailed('A scope needs to be provided to generate matrix.')
2631
27-
- name: Set up Python
28-
uses: actions/setup-python@v4
32+
- name: Install the latest version of uv
33+
uses: astral-sh/setup-uv@v5
2934
with:
30-
python-version: "3.11"
35+
version: "latest"
3136

3237
- name: "Check for tox-ansible.ini file, else add default"
3338
run: >-
@@ -36,13 +41,10 @@ runs:
3641
tox-ansible.ini; }
3742
shell: bash
3843

39-
- name: "Install tox-ansible from PyPI, includes tox"
40-
shell: bash
41-
run: python -m pip install tox-ansible
42-
4344
- name: Generate matrix
4445
id: generate-matrix
4546
shell: bash
4647
run: >
47-
echo output=$(python -m tox --ansible --gh-matrix --matrix-scope ${{ inputs.scope }} --conf tox-ansible.ini)
48+
echo output=$(uv run tox --ansible --gh-matrix --matrix-scope ${{ inputs.scope }} --conf tox-ansible.ini)
49+
echo $output
4850
echo "envlist=$output" >> $GITHUB_OUTPUT

0 commit comments

Comments
 (0)