Skip to content

Commit c7c8142

Browse files
committed
CI updates
1 parent 55b5ff2 commit c7c8142

File tree

1 file changed

+24
-39
lines changed

1 file changed

+24
-39
lines changed

.github/workflows/ci.yaml

Lines changed: 24 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -17,27 +17,20 @@ jobs:
1717
fail-fast: false
1818
matrix:
1919
os: ["ubuntu-latest"]
20-
python-version: ["3.7", "3.8"]
20+
python-version: ["3.7", "3.8", "3.9"]
2121
steps:
2222
- uses: actions/checkout@v2
23-
- name: Cache conda
24-
uses: actions/cache@v1
25-
env:
26-
# Increase this value to reset cache if ci/environment.yml has not changed
27-
CACHE_NUMBER: 0
23+
- uses: conda-incubator/setup-miniconda@v2
2824
with:
29-
path: ~/conda_pkgs_dir
30-
key: ${{ runner.os }}-conda-${{ env.CACHE_NUMBER }}-${{ hashFiles('ci/environment.yml') }}
31-
- uses: goanpeca/setup-miniconda@v1
32-
with:
33-
activate-environment: cf_xarray_test # Defined in ci/environment.yml
25+
channels: conda-forge
26+
mamba-version: "*"
27+
activate-environment: cf_xarray_test
3428
auto-update-conda: false
3529
python-version: ${{ matrix.python-version }}
36-
environment-file: ci/environment.yml
37-
use-only-tar-bz2: true # IMPORTANT: This needs to be set for caching to work properly!
3830
- name: Set up conda environment
3931
shell: bash -l {0}
4032
run: |
33+
mamba env update -f ci/environment.yml
4134
python -m pip install -e .
4235
conda list
4336
@@ -59,29 +52,21 @@ jobs:
5952
name: upstream-dev
6053
runs-on: ubuntu-latest
6154
steps:
62-
- uses: actions/checkout@v2
63-
- name: Cache conda
64-
uses: actions/cache@v1
65-
env:
66-
# Increase this value to reset cache if ci/upstream-dev-env.yml has not changed
67-
CACHE_NUMBER: 0
68-
with:
69-
path: ~/conda_pkgs_dir
70-
key: ${{ runner.os }}-conda-${{ env.CACHE_NUMBER }}-${{ hashFiles('ci/upstream-dev-env.yml') }}
71-
- uses: goanpeca/setup-miniconda@v1
72-
with:
73-
activate-environment: cf_xarray_test # Defined in ci/upstream-dev-env.yml
74-
auto-update-conda: false
75-
python-version: 3.8
76-
environment-file: ci/upstream-dev-env.yml
77-
use-only-tar-bz2: true # IMPORTANT: This needs to be set for caching to work properly!
78-
- name: Set up conda environment
79-
shell: bash -l {0}
80-
run: |
81-
python -m pip install -e .
82-
conda list
83-
84-
- name: Run Tests
85-
shell: bash -l {0}
86-
run: |
87-
pytest
55+
- uses: actions/checkout@v2
56+
- uses: conda-incubator/setup-miniconda@v2
57+
with:
58+
channels: conda-forge
59+
mamba-version: "*"
60+
activate-environment: cf_xarray_test
61+
auto-update-conda: false
62+
python-version: ${{ matrix.python-version }}
63+
- name: Set up conda environment
64+
shell: bash -l {0}
65+
run: |
66+
mamba env update -f ci/upstream-dev-env.yml
67+
python -m pip install -e .
68+
conda list
69+
- name: Run Tests
70+
shell: bash -l {0}
71+
run: |
72+
pytest

0 commit comments

Comments
 (0)