From f7862feffd8a314ac0ae1ee6fb05020aa3f271cf Mon Sep 17 00:00:00 2001 From: Marco Galardini Date: Wed, 8 Nov 2023 10:17:58 +0100 Subject: [PATCH] CI: use mamba Similar to what poppunk does --- .github/workflows/azure_ci.yml | 20 +++++++++++++------- 1 file changed, 13 insertions(+), 7 deletions(-) diff --git a/.github/workflows/azure_ci.yml b/.github/workflows/azure_ci.yml index 70d8679..5880ea0 100644 --- a/.github/workflows/azure_ci.yml +++ b/.github/workflows/azure_ci.yml @@ -21,14 +21,20 @@ jobs: uses: actions/setup-python@v2 with: python-version: ${{ matrix.python-version }} - - name: Install dependencies - run: | - $CONDA/bin/conda env update --file environment.yml --name base + - name: Get current date + id: date + run: echo "date=$(date +%Y-%m-%d)" >> "${GITHUB_OUTPUT}" + - name: Install Conda environment from environment.yml + uses: mamba-org/setup-micromamba@v1 + with: + micromamba-version: '1.4.6-0' + environment-file: environment.yml + # persist on the same day. + cache-environment-key: environment-${{ steps.date.outputs.date }} + cache-downloads-key: downloads-${{ steps.date.outputs.date }} - name: Install and run_test.py + shell: bash -l {0} run: | - PATH=$CONDA/bin/bin:$PATH - source $CONDA/bin/activate base - alias python=$CONDA/bin/python python -m pip install --no-deps --ignore-installed . pytest -v tests - cd tests && bash run_test.sh \ No newline at end of file + cd tests && bash run_test.sh