1818
1919jobs :
2020 build :
21- name : Build (${{ matrix.python-version }}, ${{ matrix.os }})
21+ name : Build (${{ matrix.python-version }}, ${{ matrix.os }}), ${{ matrix.env }}
2222 runs-on : ${{ matrix.os }}
2323 defaults :
2424 run :
@@ -27,18 +27,38 @@ jobs:
2727 fail-fast : false
2828 matrix :
2929 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
3139 steps :
3240 - uses : actions/checkout@v4
3341 with :
3442 fetch-depth : 0 # Fetch all history for all branches and tags.
3543 - name : Set environment variables
3644 run : |
3745 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
3858 - name : Set up conda environment
3959 uses : mamba-org/setup-micromamba@v2
4060 with :
41- environment-file : ci/environment.yml
61+ environment-file : ${{ env.CONDA_ENV_FILE }}
4262 environment-name : cf_xarray_test
4363 cache-environment : true
4464 create-args : >-
5878 name : codecov-umbrella
5979 fail_ci_if_error : false
6080
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-
8681 mypy :
8782 name : mypy
8883 runs-on : " ubuntu-latest"
9186 shell : bash -l {0}
9287 strategy :
9388 matrix :
94- python-version : ["3.10", "3.12 "]
89+ python-version : ["3.10", "3.13 "]
9590 steps :
9691 - uses : actions/checkout@v4
9792 with :
0 commit comments