Skip to content

Commit c5b3b09

Browse files
committed
ci(manual-test): convert from a matrix job to a single job
With this change, the `manual-test` workflow accepts user input as to what runner OS or Docker image to run on. It is more useful this way, too, as I never encountered a situation where I would want to run this Action on multiple runners, having to log in concurrently into multiple tmate sessions, and I doubt that anyone else has encountered that situation, either. Signed-off-by: Johannes Schindelin <[email protected]>
1 parent 9ca996a commit c5b3b09

File tree

1 file changed

+37
-25
lines changed

1 file changed

+37
-25
lines changed

.github/workflows/manual-test.yml

Lines changed: 37 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,13 @@
11
name: Manual test matrix
2-
on: workflow_dispatch
3-
4-
jobs:
5-
test:
6-
strategy:
7-
fail-fast: false
8-
matrix:
9-
runs-on:
2+
on:
3+
workflow_dispatch:
4+
inputs:
5+
runs-on:
6+
type: choice
7+
description: 'The runner pool to run the job on'
8+
required: true
9+
default: 'ubuntu-22.04'
10+
options:
1011
- ubuntu-22.04
1112
- ubuntu-24.04
1213
- macos-13
@@ -15,31 +16,42 @@ jobs:
1516
- windows-2019
1617
- windows-2022
1718
- windows-2025
18-
limit-access-to-actor:
19-
- true
20-
- false
21-
runs-on: ${{ matrix.runs-on }}
19+
container-runs-on:
20+
type: choice
21+
description: 'The Docker container to run the job on (this overrides the `runs-on` input)'
22+
required: false
23+
default: '(none)'
24+
options:
25+
- '(none)'
26+
- fedora:latest
27+
- archlinux:latest
28+
- ubuntu:latest
29+
limit-access-to-actor:
30+
type: choice
31+
description: 'Whether to limit access to the actor only'
32+
required: true
33+
default: 'auto'
34+
options:
35+
- auto
36+
- 'true'
37+
- 'false'
38+
39+
jobs:
40+
test:
41+
if: ${{ inputs.container-runs-on == '(none)' }}
42+
runs-on: ${{ inputs.runs-on }}
2243
steps:
2344
- uses: actions/checkout@v4
2445
- uses: ./
2546
with:
26-
limit-access-to-actor: ${{ matrix.limit-access-to-actor }}
47+
limit-access-to-actor: ${{ inputs.limit-access-to-actor }}
2748
test-container:
28-
strategy:
29-
fail-fast: false
30-
matrix:
31-
container-runs-on:
32-
- fedora:latest
33-
- archlinux:latest
34-
- ubuntu:latest
35-
limit-access-to-actor:
36-
- true
37-
- false
49+
if: ${{ inputs.container-runs-on != '(none)' }}
3850
runs-on: ubuntu-latest
3951
container:
40-
image: ${{ matrix.container-runs-on }}
52+
image: ${{ inputs.container-runs-on }}
4153
steps:
4254
- uses: actions/checkout@v4
4355
- uses: ./
4456
with:
45-
limit-access-to-actor: ${{ matrix.limit-access-to-actor }}
57+
limit-access-to-actor: ${{ inputs.limit-access-to-actor }}

0 commit comments

Comments
 (0)