Skip to content

Commit 6fc9113

Browse files
kohlercaCristiano Köhler
andauthored
Changed from conda-incubator/setup-miniconda to mamba-org/setup-micromamba GitHub Action for conda-based CI tests (#670)
Co-authored-by: Cristiano Köhler <[email protected]>
1 parent 2cea854 commit 6fc9113

File tree

1 file changed

+12
-20
lines changed

1 file changed

+12
-20
lines changed

.github/workflows/CI.yml

Lines changed: 12 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -366,29 +366,24 @@ jobs:
366366
restore-keys: datasets-
367367
enableCrossOsArchive: true
368368

369-
- uses: conda-incubator/setup-miniconda@d2e6a045a86077fb6cad6f5adf368e9076ddaa8d # corresponds to v3.1.0
369+
- uses: mamba-org/setup-micromamba@v2
370370
with:
371-
auto-update-conda: true
372-
python-version: ${{ matrix.python-version }}
373-
mamba-version: "*"
374-
channels: conda-forge
375-
channel-priority: true
376-
activate-environment: elephant
371+
create-args: python=${{ matrix.python-version }}
377372
environment-file: requirements/environment-tests.yml
378-
conda-remove-defaults: true
373+
init-shell: bash
379374

380375
- name: Install dependencies
381376
shell: bash -el {0}
382377
run: |
383378
python --version
384-
mamba install -c conda-forge pytest pytest-cov coveralls mpi4py openmpi
379+
micromamba install -y -c conda-forge pytest pytest-cov coveralls mpi4py openmpi
385380
pip install -e .
386381
387382
- name: List packages
388383
shell: bash -el {0}
389384
run: |
390385
pip list
391-
mamba list
386+
micromamba list
392387
python --version
393388
394389
- name: Test with pytest
@@ -438,23 +433,20 @@ jobs:
438433
key: ${{ runner.os }}-pip-${{ hashFiles('**/requirements-docs.txt') }}-${{ hashFiles('**/requirements-tutorials.txt') }}-${{ hashFiles('**/environment-docs.yml') }}
439434
-${{ hashFiles('**/CI.yml') }}-${{ steps.date.outputs.date }}
440435

441-
- uses: conda-incubator/setup-miniconda@d2e6a045a86077fb6cad6f5adf368e9076ddaa8d # corresponds to v3.1.0
436+
- uses: mamba-org/setup-micromamba@v2
442437
with:
443-
auto-update-conda: true
444-
python-version: ${{ matrix.python-version }}
445-
mamba-version: "*"
446-
activate-environment: elephant
438+
create-args: python=${{ matrix.python-version }}
447439
environment-file: requirements/environment.yml
448-
conda-remove-defaults: true
440+
init-shell: bash
449441

450442
- name: Install dependencies
451-
shell: bash -el {0} # enables conda incubator to activate environment
443+
shell: bash -el {0}
452444
run: |
453445
sudo apt-get update
454446
sudo apt install -y libopenmpi-dev openmpi-bin
455447
456-
mamba install -c conda-forge openmpi pandoc libstdcxx-ng # fix libstdc++.so.6: version for new scipy versions > 1.9.1
457-
mamba env update --file requirements/environment-docs.yml --name elephant
448+
micromamba install -y -c conda-forge openmpi pandoc libstdcxx-ng # fix libstdc++.so.6: version for new scipy versions > 1.9.1
449+
micromamba env update --file requirements/environment-docs.yml --name elephant
458450
python -m pip install --upgrade pip
459451
pip install -e .[extras,tutorials,docs]
460452
# run notebooks
@@ -464,7 +456,7 @@ jobs:
464456
shell: bash -el {0}
465457
run: |
466458
pip list
467-
mamba list
459+
micromamba list
468460
python --version
469461
470462
- name: make html

0 commit comments

Comments
 (0)