Skip to content

Commit

Permalink
Switch to setup-micromamba and conditionally install conda-recipe-man…
Browse files Browse the repository at this point in the history
…ager
  • Loading branch information
maresb committed Sep 28, 2024
1 parent 54880c7 commit 2a6daa0
Showing 1 changed file with 17 additions and 11 deletions.
28 changes: 17 additions & 11 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,10 @@ on:
branches:
- "*"

defaults:
run:
shell: bash -l {0}

jobs:
run:
runs-on: ${{ matrix.os }}
Expand All @@ -21,22 +25,26 @@ jobs:
PYTHON: ${{ matrix.py_ver }}
steps:
- uses: actions/checkout@master
- uses: conda-incubator/setup-miniconda@v3.0.4
- uses: mamba-org/setup-micromamba@v1
with:
auto-update-conda: true
channels: conda-forge,defaults
channel-priority: true
python-version: ${{ matrix.py_ver }}
environment-file: environment.yaml
activate-environment: gs
create-args: >-
python=${{ matrix.py_ver }}
cache-environment: true
- name: Conda info
shell: bash -l {0}
run: |
conda info --all
conda list
- name: Install conda-recipe-manager if possible
# If the Python version is >=3.11, then run `micromamba install -y -c conda-forge conda-recipe-manager`
run: |
if [ $(python -c "import sys; print(sys.version_info[:2] >= (3,11))") = "True" ]; then
echo "Installing conda-recipe-manager"
micromamba install -y -c conda-forge conda-recipe-manager
else
echo "Skipping conda-recipe-manager installation"
fi
- name: Running doctests
shell: bash -l {0}
run: |
pytest grayskull \
-vv \
Expand All @@ -51,7 +59,6 @@ jobs:
--junit-prefix=Linux-py${{ matrix.py_ver }}-serial
- name: Running serial tests
shell: bash -l {0}
run: |
pytest tests \
-vv \
Expand All @@ -67,7 +74,6 @@ jobs:
--junit-prefix=Linux-py${{ matrix.py_ver }}-serial
- name: Running parallel tests
shell: bash -l {0}
run: |
pytest tests \
-vv \
Expand Down

0 comments on commit 2a6daa0

Please sign in to comment.