Skip to content

Commit f735411

Browse files
committed
feat(ci): add matrix os choice
1 parent 59be277 commit f735411

File tree

1 file changed

+20
-7
lines changed

1 file changed

+20
-7
lines changed

.github/workflows/integration-test.yml

Lines changed: 20 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -17,17 +17,30 @@ on:
1717
- cron: "0 0 * * 0"
1818
workflow_dispatch:
1919
inputs:
20-
runner-os:
21-
default: ubuntu-latest
22-
type: choice
23-
options:
24-
- ubuntu-latest
25-
- macos-latest
20+
ubuntu-latest:
21+
type: boolean
22+
default: true
23+
macos-latest:
24+
type: boolean
25+
default: false
2626

2727

2828
jobs:
29+
get-selected-os:
30+
runs-on: ubuntu-latest
31+
outputs: # This needs to be set if you want to consume the output on another job
32+
os-runners: ${{ steps.get-selected-os.outputs.selected}}
33+
steps:
34+
- name: Get selected runner OS
35+
id: get-selected-os
36+
uses: joao-zanutto/get-selected@v1
37+
2938
run-it-tests-job:
30-
runs-on: ${{ inputs.runner-os || 'ubuntu-latest' }}
39+
needs: get-selected-os
40+
strategy:
41+
matrix:
42+
os: ${{ fromJson(needs.get-selected-os.outputs.os-runners) }}
43+
runs-on: ${{ matrix.os }}
3144
steps:
3245
- name: Checkout
3346
uses: actions/checkout@v2

0 commit comments

Comments
 (0)