Skip to content

Commit

Permalink
Merge pull request #139 from zmoon/ci
Browse files Browse the repository at this point in the history
Speed up CI a bit by avoiding micromamba call if not needed
  • Loading branch information
zmoon authored Jul 13, 2023
2 parents ccada51 + 61b88d8 commit aad3124
Showing 1 changed file with 12 additions and 1 deletion.
13 changes: 12 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,18 @@ jobs:

- name: Ensure xesmf>=0.7 if not on Python 3.6
if: matrix.python-version != '3.6'
run: micromamba install 'xesmf>=0.7'
run: |
update_needed=$(python -c "
import sys
from packaging.version import Version
import xesmf as xe
v = Version(getattr(xe, '__version__', '0.0.0'))
print(v, file=sys.stderr)
print('n' if v >= Version('0.7') else 'y')
")
if [[ $update_needed == 'y' ]]; then
micromamba install 'xesmf>=0.7'
fi
- name: Install package
run: python -m pip install -e . --no-deps
Expand Down

0 comments on commit aad3124

Please sign in to comment.