Skip to content

Commit a9751ed

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

File tree

1 file changed

+26
-8
lines changed

1 file changed

+26
-8
lines changed

.github/workflows/integration-test.yml

Lines changed: 26 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -17,18 +17,35 @@ 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.os-runners }}
33+
env:
34+
INPUTS: ${{ toJson(inputs) }}
35+
steps:
36+
- name: Get selected runner OS
37+
id: get-selected-os
38+
run: >
39+
echo "os-runners=$(jq -cr 'map_values(. // empty) | keys' <<< $INPUTS)" >> $GITHUB_OUTPUT
40+
2941
run-it-tests-job:
30-
runs-on: ${{ inputs.runner-os || 'ubuntu-latest' }}
42+
needs: get-selected-os
43+
strategy:
44+
matrix:
45+
os: ${{ fromJSON(needs.get-selected-os.outputs.os-runners) }}
46+
runs-on: ${{ matrix.os || 'ubuntu-latest' }}
3147
steps:
48+
# - run: echo '${{ needs.get-selected-os.outputs.os-runners }}'
3249
- name: Checkout
3350
uses: actions/checkout@v2
3451

@@ -42,7 +59,8 @@ jobs:
4259
id: setup-docker-mac
4360
if: ${{ runner.os == 'macOS' }}
4461
run: |
45-
brew install docker
62+
brew install --reinstall qemu
63+
brew install docker colima
4664
colima start
4765
4866
- name: Set up Project

0 commit comments

Comments
 (0)