diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index bbded6a4d..5f1517744 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -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 @@ -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 # ____ # | _ \ ___ ___ ___