Skip to content

Commit 6db666b

Browse files
effigiescoalsont
authored andcommitted
CI: Use arrays to indicate conda or native setup
1 parent 0eff37b commit 6db666b

File tree

1 file changed

+13
-5
lines changed

1 file changed

+13
-5
lines changed

.github/workflows/test.yml

Lines changed: 13 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,15 @@ jobs:
2525
strategy:
2626
fail-fast: false
2727
matrix:
28-
python-version: ["2.7", "3.6", "3.7", "3.8", "3.9", "3.10", "3.11", "3.12"]
28+
python:
29+
- ["conda", "2.7"]
30+
- ["conda", "3.6"]
31+
- ["conda", "3.7"]
32+
- ["native", "3.8"]
33+
- ["native", "3.9"]
34+
- ["native", "3.10"]
35+
- ["native", "3.11"]
36+
- ["native", "3.12"]
2937
requires: ["", "requirements.txt"]
3038

3139
steps:
@@ -34,14 +42,14 @@ jobs:
3442
- name: Set up Python ${{ matrix.python-version }} (native)
3543
uses: actions/setup-python@v4
3644
with:
37-
python-version: ${{ matrix.python-version }}
45+
python-version: ${{ matrix.python[1] }}
3846
allow-prereleases: true
39-
if: matrix.python-version > 3.8
47+
if: matrix.python[0] == 'native'
4048
- name: Set up Python ${{ matrix.python-version }} (miniconda)
4149
uses: conda-incubator/setup-miniconda@v2
4250
with:
43-
python-version: ${{ matrix.python-version }}
44-
if: matrix.python-version <= 3.8
51+
python-version: ${{ matrix.python[1] }}
52+
if: matrix.python[0] == 'conda'
4553
- name: Check environment
4654
run: |
4755
which python

0 commit comments

Comments
 (0)