Skip to content

Commit

Permalink
Move to micromamba
Browse files Browse the repository at this point in the history
Closes ml31415#75
  • Loading branch information
dcherian committed Mar 27, 2023
1 parent 3ab5474 commit 09c5454
Showing 1 changed file with 14 additions and 19 deletions.
33 changes: 14 additions & 19 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -35,28 +35,23 @@ jobs:
echo "CONDA_ENV_FILE=ci/environment.yml" >> $GITHUB_ENV
echo "PYTHON_VERSION=${{ matrix.python-version }}" >> $GITHUB_ENV
- name: Cache conda
id: cache-conda
uses: actions/cache@v3
- name: Setup micromamba
uses: mamba-org/provision-with-micromamba@v15
with:
path: ~/conda_pkgs_dir
key: ${{ runner.os }}-conda-py${{ matrix.python-version }}-${{
hashFiles('ci/**.yml') }}
environment-file: ${{ env.CONDA_ENV_FILE }}
environment-name: xarray-tests
cache-env: true
cache-env-key: "${{runner.os}}-${{runner.arch}}-py${{matrix.python-version}}-${{env.TODAY}}-${{hashFiles(env.CONDA_ENV_FILE)}}"
extra-specs: |
python=${{matrix.python-version}}
conda
- uses: conda-incubator/setup-miniconda@v2
with:
channels: conda-forge
channel-priority: strict
mamba-version: "*"
activate-environment: npg-tests
auto-update-conda: false
python-version: ${{ matrix.python-version }}
use-only-tar-bz2: true

- name: Install conda dependencies
# We only want to install this on one run, because otherwise we'll have
# duplicate annotations.
- name: Install error reporter
if: ${{ matrix.os }} == 'ubuntu-latest' and ${{ matrix.python-version }} == '3.10'
run: |
mamba env update -f $CONDA_ENV_FILE
if: steps.cache-env.outputs.cache-hit != 'true'
python -m pip install pytest-github-actions-annotate-failures
- name: Set up conda environment
shell: bash -l {0}
Expand Down

0 comments on commit 09c5454

Please sign in to comment.