Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

use micromamba in CI #500

Merged
merged 3 commits into from
Aug 10, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
42 changes: 16 additions & 26 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,10 @@ on:
- cron: '0 0 * * *' # Daily “At 00:00”
workflow_dispatch: # allows you to trigger manually

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

jobs:
build:
name: python-${{ matrix.python-version }}
Expand All @@ -22,25 +26,18 @@ jobs:
matrix:
python-version: ['3.8', '3.9', '3.10']
steps:
- name: Cancel previous runs
uses: styfle/cancel-workflow-action@0.10.0
with:
access_token: ${{ github.token }}
- uses: actions/checkout@v3
with:
fetch-depth: 0 # Fetch all history for all branches and tags.

- uses: conda-incubator/setup-miniconda@master
- name: Create conda environment
uses: mamba-org/provision-with-micromamba@main
with:
channels: conda-forge
channel-priority: strict
activate-environment: intake-esm-dev
auto-update-conda: false
python-version: ${{ matrix.python-version }}
cache-downloads: true
micromamba-version: 'latest'
environment-file: ci/environment.yml
mamba-version: '*'
use-mamba: true
miniforge-variant: Mambaforge
extra-specs: |
python=${{ matrix.python-version }}

- name: Install intake-esm
run: |
Expand Down Expand Up @@ -69,25 +66,18 @@ jobs:
run:
shell: bash -l {0}
steps:
- name: Cancel previous runs
uses: styfle/cancel-workflow-action@0.10.0
with:
access_token: ${{ github.token }}
- uses: actions/checkout@v3
with:
fetch-depth: 0 # Fetch all history for all branches and tags.

- uses: conda-incubator/setup-miniconda@master
- name: Create conda environment
uses: mamba-org/provision-with-micromamba@main
with:
channels: conda-forge
channel-priority: strict
activate-environment: intake-esm-dev
auto-update-conda: false
python-version: 3.9
cache-downloads: true
micromamba-version: 'latest'
environment-file: ci/environment-upstream-dev.yml
mamba-version: '*'
use-mamba: true
miniforge-variant: Mambaforge
extra-specs: |
python=3.10

- name: Install intake-esm
run: |
Expand Down
2 changes: 1 addition & 1 deletion ci/environment-upstream-dev.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ dependencies:
- regionmask
- scipy
- toolz
- xcollection
- xgcm
- zarr>=2.5
- pip:
Expand All @@ -35,4 +36,3 @@ dependencies:
- git+https://github.com/fsspec/s3fs.git
- git+https://github.com/pydata/xarray.git
- git+https://github.com/jbusecke/cmip6_preprocessing.git
- -r ../requirements.txt
5 changes: 2 additions & 3 deletions ci/environment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,12 +19,11 @@ dependencies:
- pydantic
- pytest
- pytest-cov
# - pytest-icdiff
- pytest-sugar
- pytest-xdist
- s3fs
- scipy
- xarray>=0.19,!=0.20.0,!=0.20.1
- xcollection
- zarr >=2.5
- pip:
- -r ../requirements.txt
# - pytest-icdiff