18
18
19
19
jobs :
20
20
build :
21
- name : Build (${{ matrix.python-version }}, ${{ matrix.os }})
21
+ name : Build (${{ matrix.python-version }}, ${{ matrix.os }}), ${{ matrix.env }}
22
22
runs-on : ${{ matrix.os }}
23
23
defaults :
24
24
run :
@@ -27,18 +27,38 @@ jobs:
27
27
fail-fast : false
28
28
matrix :
29
29
os : ["ubuntu-latest"]
30
- python-version : ["3.10", "3.12"]
30
+ python-version : ["3.10", "3.13"]
31
+ env : [""]
32
+ include :
33
+ - env : " all-min-deps"
34
+ python-version : " 3.10"
35
+ os : ubuntu-latest
36
+ - env : " no-optional-deps"
37
+ python-version : " 3.13"
38
+ os : ubuntu-latest
31
39
steps :
32
40
- uses : actions/checkout@v4
33
41
with :
34
42
fetch-depth : 0 # Fetch all history for all branches and tags.
35
43
- name : Set environment variables
36
44
run : |
37
45
echo "PYTHON_VERSION=${{ matrix.python-version }}" >> $GITHUB_ENV
46
+ if [[ "${{ matrix.env }}" == "" ]] ;
47
+ then
48
+ echo "CONDA_ENV_FILE=ci/environment.yml" >> $GITHUB_ENV
49
+ fi
50
+ if [[ "${{ matrix.env }}" == "no-optional-deps" ]] ;
51
+ then
52
+ echo "CONDA_ENV_FILE=ci/environment-no-optional-deps.yml" >> $GITHUB_ENV
53
+ fi
54
+ if [[ "${{ matrix.env }}" == "all-min-deps" ]] ;
55
+ then
56
+ echo "CONDA_ENV_FILE=ci/environment-all-min-deps.yml" >> $GITHUB_ENV
57
+ fi
38
58
- name : Set up conda environment
39
59
uses : mamba-org/setup-micromamba@v2
40
60
with :
41
- environment-file : ci/environment.yml
61
+ environment-file : ${{ env.CONDA_ENV_FILE }}
42
62
environment-name : cf_xarray_test
43
63
cache-environment : true
44
64
create-args : >-
58
78
name : codecov-umbrella
59
79
fail_ci_if_error : false
60
80
61
- no-optional-deps :
62
- name : no-optional-deps
63
- runs-on : ubuntu-latest
64
- defaults :
65
- run :
66
- shell : bash -l {0}
67
- steps :
68
- - uses : actions/checkout@v4
69
- with :
70
- # need to fetch all tags to get a correct version
71
- fetch-depth : 0 # fetch all branches and tags
72
- - name : Set up conda environment
73
- uses : mamba-org/setup-micromamba@v2
74
- with :
75
- environment-file : ci/environment-no-optional-deps.yml
76
- environment-name : cf_xarray_test
77
- cache-environment : true
78
- - name : Install cf_xarray
79
- run : |
80
- python -m pip install --no-deps -e .
81
- - name : Run Tests
82
- shell : bash -l {0}
83
- run : |
84
- pytest -n 2
85
-
86
81
mypy :
87
82
name : mypy
88
83
runs-on : " ubuntu-latest"
91
86
shell : bash -l {0}
92
87
strategy :
93
88
matrix :
94
- python-version : ["3.10", "3.12 "]
89
+ python-version : ["3.10", "3.13 "]
95
90
steps :
96
91
- uses : actions/checkout@v4
97
92
with :
0 commit comments