Skip to content

Commit bd2a1df

Browse files
actions: use mamba to provision Python environment
1 parent 8b82e47 commit bd2a1df

File tree

1 file changed

+19
-5
lines changed

1 file changed

+19
-5
lines changed

.github/workflows/tests.yml

Lines changed: 19 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -15,13 +15,17 @@ concurrency:
1515
env:
1616
FORCE_COLOR: 2
1717

18+
defaults:
19+
run:
20+
shell: micromamba-shell {0}
21+
1822
jobs:
1923
test:
2024
runs-on: ubuntu-latest
2125
timeout-minutes: 5
2226
strategy:
2327
matrix:
24-
python-version: ['3.7', '3.8', '3.9', '3.10', '3.11']
28+
python-version: ['3.7', '3.8', '3.9', '3.10', '3.11', '3.12', '3']
2529
fail-fast: false
2630
env:
2731
PYTEST_ADDOPTS: --cov --cov-append --color=yes
@@ -30,9 +34,14 @@ jobs:
3034
uses: actions/checkout@v4
3135

3236
- name: Configure Python
33-
uses: actions/setup-python@v5
37+
uses: mamba-org/setup-micromamba@v2
3438
with:
35-
python-version: ${{ matrix.python-version }}
39+
generate-run-shell: true
40+
cache-environment: true
41+
post-cleanup: 'all'
42+
environment-name: cylc
43+
create-args: >-
44+
python=${{ matrix.python-version }}
3645
3746
- name: install libs
3847
uses: cylc/release-actions/install-cylc-components@v1
@@ -111,9 +120,14 @@ jobs:
111120
uses: actions/checkout@v4
112121

113122
- name: Configure Python
114-
uses: actions/setup-python@v5
123+
uses: mamba-org/setup-micromamba@v2
115124
with:
116-
python-version: '3.9'
125+
generate-run-shell: true
126+
cache-environment: true
127+
post-cleanup: 'all'
128+
environment-name: cylc
129+
create-args: >-
130+
python=${{ matrix.python-version }}
117131
118132
- name: install libs
119133
uses: cylc/release-actions/install-cylc-components@v1

0 commit comments

Comments
 (0)