@@ -32,40 +32,22 @@ jobs:
32
32
fetch-depth : 0 # Fetch all history for all branches and tags.
33
33
- name : Set environment variables
34
34
run : |
35
- echo "CONDA_ENV_FILE=ci/environment.yml" >> $GITHUB_ENV
36
35
echo "PYTHON_VERSION=${{ matrix.python-version }}" >> $GITHUB_ENV
37
- - name : Cache conda
38
- uses : actions/cache@v3
39
- with :
40
- path : ~/conda_pkgs_dir
41
- key :
42
- ${{ runner.os }}-conda-py${{ matrix.python-version }}-${{
43
- hashFiles('ci/**.yml') }}
44
- - uses : conda-incubator/setup-miniconda@v2
45
- with :
46
- channels : conda-forge
47
- channel-priority : strict
48
- mamba-version : " *"
49
- activate-environment : flox-tests
50
- auto-update-conda : false
51
- python-version : ${{ matrix.python-version }}
52
- use-only-tar-bz2 : true
53
-
54
- - name : Install conda dependencies
55
- run : |
56
- mamba env update -f $CONDA_ENV_FILE
57
-
58
36
- name : Set up conda environment
59
- shell : bash -l {0}
37
+ uses : mamba-org/provision-with-micromamba@v12
38
+ with :
39
+ environment-file : ci/environment.yml
40
+ environment-name : flox-tests
41
+ cache-env : true
42
+ extra-specs : |
43
+ python="${{ matrix.python-version }}"
44
+ - name : Install flox
60
45
run : |
61
46
python -m pip install -e .
62
47
conda list
63
-
64
48
- name : Run Tests
65
- shell : bash -l {0}
66
49
run : |
67
50
pytest -n auto --cov=./ --cov-report=xml
68
-
69
51
- name : Upload code coverage to Codecov
70
52
71
53
with :
@@ -75,26 +57,57 @@ jobs:
75
57
name : codecov-umbrella
76
58
fail_ci_if_error : false
77
59
60
+ optional-deps :
61
+ name : ${{ matrix.env }}
62
+ runs-on : ${{ matrix.os }}
63
+ defaults :
64
+ run :
65
+ shell : bash -l {0}
66
+ strategy :
67
+ fail-fast : false
68
+ matrix :
69
+ os : ["ubuntu-latest"]
70
+ env :
71
+ [
72
+ " no-xarray" ,
73
+ " no-dask" ,
74
+ " minimal-requirements" ,
75
+ ]
76
+ steps :
77
+ - uses : actions/checkout@v3
78
+ with :
79
+ fetch-depth : 0 # Fetch all history for all branches and tags.
80
+ - name : Set up conda environment
81
+ uses : mamba-org/provision-with-micromamba@v12
82
+ with :
83
+ environment-file : ci/${{ matrix.env }}.yml
84
+ environment-name : flox-tests
85
+ cache-env : true
86
+ extra-specs : |
87
+ python="${{ matrix.python-version }}"
88
+ - name : Install flox
89
+ run : |
90
+ python -m pip install --no-deps -e .
91
+ - name : Run tests
92
+ run : |
93
+ python -m pytest -n auto
94
+
78
95
upstream-dev :
79
96
name : upstream-dev
80
97
runs-on : ubuntu-latest
98
+ defaults :
99
+ run :
100
+ shell : bash -l {0}
81
101
steps :
82
102
- uses : actions/checkout@v3
83
- - uses : conda-incubator/setup-miniconda@v2
84
- with :
85
- channels : conda-forge
86
- mamba-version : " *"
87
- activate-environment : flox-tests
88
- auto-update-conda : false
89
- python-version : ' 3.10'
90
103
- name : Set up conda environment
91
- shell : bash -l {0}
92
- run : |
93
- mamba env update -f ci/upstream-dev-env.yml
94
- python -m pip install -e .
95
- conda list
104
+ uses : mamba-org/provision-with-micromamba@v12
105
+ with :
106
+ environment-file : ci/upstream-dev-env.yml
107
+ environment-name : flox-tests
108
+ extra-specs : |
109
+ python="3.10"
96
110
- name : Run Tests
97
- shell : bash -l {0}
98
111
run : |
99
112
pytest -n 2
100
113
@@ -110,10 +123,11 @@ jobs:
110
123
repository : ' pydata/xarray'
111
124
fetch-depth : 0 # Fetch all history for all branches and tags.
112
125
- name : Set up conda environment
113
- uses : mamba-org/provision-with-micromamba@de032af7fb3675649f3d4bbdda85178ba412ee41
126
+ uses : mamba-org/provision-with-micromamba@v12
114
127
with :
115
128
environment-file : ci/requirements/environment.yml
116
129
environment-name : xarray-tests
130
+ cache-env : true
117
131
extra-specs : |
118
132
python="3.10"
119
133
- name : Install xarray
0 commit comments