Skip to content

Commit

Permalink
Use setup-micromamba for test workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
maresb committed May 28, 2023
1 parent 2c3fef3 commit f21a97e
Showing 1 changed file with 20 additions and 21 deletions.
41 changes: 20 additions & 21 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,28 +23,29 @@ jobs:
runs-on: windows-latest
steps:
- uses: actions/checkout@v3
- uses: conda-incubator/setup-miniconda@v2

- name: Install Conda environment with Micromamba
uses: mamba-org/setup-micromamba@v1
with:
python-version: ${{ matrix.python-version }}
channels: conda-forge
miniforge-variant: Mambaforge
miniforge-version: 22.9.0-1
auto-update-conda: false
environment-name: test-env
init-shell: powershell
create-args: >-
python=3.11
mamba
pip
pytest-cov
pytest-xdist
- name: Install dev deps
run: |
conda activate test
mamba install pip pytest-cov pytest-xdist
python -m pip install -r requirements-dev.txt
- name: install conda-lock
run: |
conda activate test
pip install -e . --force-reinstall
- name: run-test
run: |
conda activate test
copy pyproject.toml "%RUNNER_TEMP%"
Xcopy /E /I tests "%RUNNER_TEMP%\\tests"
pushd "${RUNNER_TEMP}"
Expand All @@ -70,18 +71,19 @@ jobs:
steps:
- uses: actions/checkout@v3

- uses: conda-incubator/setup-miniconda@v2
- uses: mamba-org/setup-micromamba@v1
with:
python-version: ${{ matrix.python-version }}
channels: conda-forge
miniforge-variant: Mambaforge
miniforge-version: 22.9.0-1
auto-update-conda: false
environment-name: test-env
init-shell: bash
create-args: >-
python=${{ matrix.python-version }}
mamba
pip
pytest-cov
pytest-xdist
- name: Install dev deps
run: |
conda activate test
mamba install pip pytest-cov pytest-xdist
set -x
echo "${PATH}"
which pip
Expand All @@ -91,14 +93,12 @@ jobs:
- name: install conda-lock
shell: bash -l {0}
run: |
conda activate test
which pip
pip install -e . --force-reinstall
- name: run-test
shell: bash -l {0}
run: |
conda activate test
cp pyproject.toml "${RUNNER_TEMP}/"
cp -a tests "${RUNNER_TEMP}/"
pushd "${RUNNER_TEMP}"
Expand All @@ -113,7 +113,6 @@ jobs:
- name: test-gdal
shell: bash -l {0}
run: |
conda activate test
pushd "${RUNNER_TEMP}/tests/gdal"
export TMPDIR="${RUNNER_TEMP}"
ls -lah
Expand Down

0 comments on commit f21a97e

Please sign in to comment.