Skip to content

Commit efc7676

Browse files
committed
Run test_install only for linux by default
1 parent 1f5dc8a commit efc7676

File tree

1 file changed

+11
-5
lines changed

1 file changed

+11
-5
lines changed

.github/workflows/test-install.yml

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,13 @@ name: Test installation
33
on:
44
pull_request:
55
branches:
6-
- master
6+
- master
7+
workflow_dispatch:
8+
inputs:
9+
os:
10+
description: 'Operating systems to test (comma separated, e.g. "ubuntu-latest,macos-latest,windows-latest")'
11+
required: false
12+
default: 'ubuntu-latest'
713

814
jobs:
915

@@ -15,7 +21,7 @@ jobs:
1521
strategy:
1622
fail-fast: false
1723
matrix:
18-
os: [ubuntu-latest, macos-latest, windows-latest]
24+
os: ${{ fromJson(github.event_name == 'workflow_dispatch' && github.event.inputs.os && format('["{0}"]', join(split(github.event.inputs.os, ','), '","')) || '["ubuntu-latest"]') }}
1925
python-version: [3.9, '3.10', 3.11, 3.12, 3.13]
2026

2127
runs-on: ${{ matrix.os }}
@@ -51,7 +57,7 @@ jobs:
5157
strategy:
5258
fail-fast: false
5359
matrix:
54-
os: [ubuntu-latest, macos-latest, windows-latest]
60+
os: ${{ fromJson(github.event_name == 'workflow_dispatch' && github.event.inputs.os && format('["{0}"]', join(split(github.event.inputs.os, ','), '","')) || '["ubuntu-latest"]') }}
5561
python-version: [3.9, '3.10', 3.11, 3.12, 3.13]
5662

5763
runs-on: ${{ matrix.os }}
@@ -86,7 +92,7 @@ jobs:
8692
strategy:
8793
fail-fast: false
8894
matrix:
89-
os: [ubuntu-latest, macos-latest, windows-latest]
95+
os: ${{ fromJson(github.event_name == 'workflow_dispatch' && github.event.inputs.os && format('["{0}"]', join(split(github.event.inputs.os, ','), '","')) || '["ubuntu-latest"]') }}
9096
python-version: [3.9, '3.10', 3.11, 3.12, 3.13]
9197

9298
runs-on: ${{ matrix.os }}
@@ -150,7 +156,7 @@ jobs:
150156
strategy:
151157
fail-fast: false
152158
matrix:
153-
os: [ubuntu-latest, macos-latest, windows-latest]
159+
os: ${{ fromJson(github.event_name == 'workflow_dispatch' && github.event.inputs.os && format('["{0}"]', join(split(github.event.inputs.os, ','), '","')) || '["ubuntu-latest"]') }}
154160
python-version: [3.9, '3.10', 3.11, 3.12, 3.13]
155161

156162
runs-on: ${{ matrix.os }}

0 commit comments

Comments
 (0)