From f008d7e45da5871a24e575c7b7e2d2f4d935d677 Mon Sep 17 00:00:00 2001 From: Cristian Pozo Gonzalez Date: Wed, 11 Sep 2024 17:21:55 +0200 Subject: [PATCH] Update the ci workflow to use mamba instead of conda --- .github/workflows/run_test.yml | 25 ++++++++++++++++++++----- 1 file changed, 20 insertions(+), 5 deletions(-) diff --git a/.github/workflows/run_test.yml b/.github/workflows/run_test.yml index 8fd4698..926eca5 100644 --- a/.github/workflows/run_test.yml +++ b/.github/workflows/run_test.yml @@ -11,14 +11,29 @@ jobs: uses: actions/setup-python@v3 with: python-version: '3.10' - - name: Add conda to system path + - name: Prepare mamba installation + env: + PYTHON_VERSION: '3.10' run: | - # $CONDA is an environment variable pointing to the root of the miniconda directory - echo $CONDA/bin >> $GITHUB_PATH + # setup correct python version + sed -i -e "s/- python=.*/- python=$PYTHON_VERSION/g" environment.yml + + - name: Mamba setup + uses: mamba-org/setup-micromamba@v1 + with: + environment-file: environment.yml + cache-downloads: true + - name: Install dependencies run: | - conda env update --file environment.yml --name base + python --version + echo "Installing additional pip packages" + + echo "pip install ." + pip install . + + pip install pytest + - name: Test with pytest run: | - conda install pytest pytest \ No newline at end of file