Skip to content

Commit

Permalink
[MAIN] Fix CI conda runner (#598)
Browse files Browse the repository at this point in the history
* use setup miniconda action
  • Loading branch information
Moritz-Alexander-Kern authored Oct 24, 2023
1 parent 0354d0e commit e929acb
Showing 1 changed file with 22 additions and 17 deletions.
39 changes: 22 additions & 17 deletions .github/workflows/CI.yml
Original file line number Diff line number Diff line change
Expand Up @@ -310,6 +310,7 @@ jobs:
matrix:
# OS [ubuntu-latest, macos-latest, windows-latest]
os: [ubuntu-latest]
python-version: [3.9]

# do not cancel all in-progress jobs if any matrix job fails
fail-fast: false
Expand All @@ -324,32 +325,36 @@ jobs:

key: ${{ runner.os }}-pip-${{hashFiles('requirements/environment-tests.yml') }}-${{ hashFiles('**/CI.yml') }}-${{ steps.date.outputs.date }}

- name: Add conda to system path
run: |
# $CONDA is an environment variable pointing to the root of the miniconda directory
echo $CONDA/bin >> $GITHUB_PATH
- uses: conda-incubator/setup-miniconda@3b0f2504dd76ef23b6d31f291f4913fb60ab5ff3 # corresponds to v2.2.0
with:
auto-update-conda: true
python-version: ${{ matrix.python-version }}
activate-environment: elephant
environment-file: requirements/environment-tests.yml
auto-activate-base: false
use-only-tar-bz2: true # IMPORTANT: This needs to be set for caching to work properly!

- name: Install dependencies
shell: bash -l {0}
run: |
conda config --add channels conda-forge # bugfix with scipy==1.8.1: libstdcxx-ng 12.1.0 required
conda update conda
conda install -c conda-forge libstdcxx-ng=12 # fix libstdc++.so.6: version for new scipy versions > 1.9.1
conda env update --file requirements/environment-tests.yml --name base
activate base
conda install -c conda-forge openmpi
pip install -r requirements/requirements-tests.txt
pip install pytest
pip install pytest-cov coveralls
pip install .
python --version
conda env list
conda install mpi4py openmpi
conda install pytest
conda install pytest-cov coveralls
pip install -e .
- name: List packages
shell: bash -l {0}
run: |
activate base
pip list
conda list
python --version
- name: Test with pytest
shell: bash -l {0}
run: |
activate base
pytest --cov=elephant --import-mode=importlib
pytest --cov=elephant
# ____
# | _ \ ___ ___ ___
Expand Down

0 comments on commit e929acb

Please sign in to comment.