Skip to content

Commit 238f0ba

Browse files
committed
use different python versions in mamba setup in CI
1 parent a2870bf commit 238f0ba

File tree

1 file changed

+11
-9
lines changed

1 file changed

+11
-9
lines changed

Diff for: .github/workflows/ci.yml

+11-9
Original file line numberDiff line numberDiff line change
@@ -48,19 +48,21 @@ jobs:
4848
- uses: actions/checkout@v4
4949
with:
5050
fetch-depth: 0
51+
52+
- name: Prepare environment file for Mamba installation
53+
env:
54+
PYTHON_VERSION: ${{ matrix.python-version }}
55+
run: |
56+
# setup correct python version
57+
sed -i -e "s/- python=.*/- python=$PYTHON_VERSION/g" environment.yml
5158
5259
- name: Setup Mamba
5360
uses: mamba-org/setup-micromamba@v1
5461
with:
55-
# the create command looks like this:
56-
# `micromamba create -n test-env -c conda-forge python=3.11 lstchain`
57-
environment-name: test-env
58-
condarc: |
59-
channels:
60-
- conda-forge
61-
create-args: >-
62-
python=${{ matrix.python-version }}
63-
lstchain
62+
environment-file: environment.yml
63+
cache-environment: true
64+
post-cleanup: 'all'
65+
6466

6567
- name: Build the package
6668
run: |

0 commit comments

Comments
 (0)