Skip to content

Commit

Permalink
CI: Use arrays to indicate conda or native setup
Browse files Browse the repository at this point in the history
  • Loading branch information
effigies authored and coalsont committed Sep 19, 2023
1 parent 0eff37b commit 6db666b
Showing 1 changed file with 13 additions and 5 deletions.
18 changes: 13 additions & 5 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,15 @@ jobs:
strategy:
fail-fast: false
matrix:
python-version: ["2.7", "3.6", "3.7", "3.8", "3.9", "3.10", "3.11", "3.12"]
python:
- ["conda", "2.7"]
- ["conda", "3.6"]
- ["conda", "3.7"]
- ["native", "3.8"]
- ["native", "3.9"]
- ["native", "3.10"]
- ["native", "3.11"]
- ["native", "3.12"]
requires: ["", "requirements.txt"]

steps:
Expand All @@ -34,14 +42,14 @@ jobs:
- name: Set up Python ${{ matrix.python-version }} (native)
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
python-version: ${{ matrix.python[1] }}
allow-prereleases: true
if: matrix.python-version > 3.8
if: matrix.python[0] == 'native'
- name: Set up Python ${{ matrix.python-version }} (miniconda)
uses: conda-incubator/setup-miniconda@v2
with:
python-version: ${{ matrix.python-version }}
if: matrix.python-version <= 3.8
python-version: ${{ matrix.python[1] }}
if: matrix.python[0] == 'conda'
- name: Check environment
run: |
which python
Expand Down

0 comments on commit 6db666b

Please sign in to comment.