@@ -20,55 +20,43 @@ jobs:
2020 build :
2121 name : Build (${{ matrix.python-version }}, ${{ matrix.os }}), ${{ matrix.env }}
2222 runs-on : ${{ matrix.os }}
23- defaults :
24- run :
25- shell : bash -l {0}
2623 strategy :
2724 fail-fast : false
2825 matrix :
2926 os : ["ubuntu-latest"]
3027 python-version : ["3.11", "3.13"]
31- env : [""]
28+ env : ["test "]
3229 include :
33- - env : " all -min-deps"
30+ - env : " test -min-deps"
3431 python-version : " 3.11"
3532 os : ubuntu-latest
36- - env : " no-optional-deps "
33+ - env : " test- no-optional"
3734 python-version : " 3.13"
3835 os : ubuntu-latest
3936 steps :
4037 - uses : actions/checkout@v5
4138 with :
4239 fetch-depth : 0 # Fetch all history for all branches and tags.
43- - name : Set environment variables
44- run : |
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
58- - name : Set up conda environment
59- uses : mamba-org/setup-micromamba@v2
40+
41+ - name : Set up Python
42+ uses : actions/setup-python@v5
43+ with :
44+ python-version : ${{ matrix.python-version }}
45+
46+ - name : Install uv
47+ uses : astral-sh/setup-uv@v4
6048 with :
61- environment-file : ${{ env.CONDA_ENV_FILE }}
62- environment-name : cf_xarray_test
63- cache-environment : true
64- create-args : >-
65- python=${{ matrix.python-version }}
66- - name : Install cf_xarray
49+ enable-cache : true
50+
51+ - name : Install dependencies
6752 run : |
68- python -m pip install --no-deps -e .
53+ uv pip install --system -e .
54+ uv pip install --system --group ${{ matrix.env }}
55+
6956 - name : Run Tests
7057 run : |
7158 pytest -n auto --cov=./ --cov-report=xml
59+
7260 - name : Upload code coverage to Codecov
73617462 with :
@@ -81,33 +69,34 @@ jobs:
8169 mypy :
8270 name : mypy
8371 runs-on : " ubuntu-latest"
84- defaults :
85- run :
86- shell : bash -l {0}
8772 strategy :
8873 matrix :
8974 python-version : ["3.11", "3.13"]
9075 steps :
9176 - uses : actions/checkout@v5
9277 with :
9378 fetch-depth : 0 # Fetch all history for all branches and tags.
94- - name : Set up conda environment
95- uses : mamba-org/setup-micromamba@v2
79+
80+ - name : Set up Python
81+ uses : actions/setup-python@v5
9682 with :
97- environment-file : ci/environment.yml
98- environment-name : cf_xarray_test
99- cache-environment : true
100- create-args : >-
101- python=${{ matrix.python-version }}
102- - name : Install cf_xarray
103- run : |
104- python -m pip install --no-deps -e .
105- - name : Install mypy
83+ python-version : ${{ matrix.python-version }}
84+
85+ - name : Install uv
86+ uses : astral-sh/setup-uv@v4
87+ with :
88+ enable-cache : true
89+
90+ - name : Install dependencies
10691 run : |
107- python -m pip install 'mypy'
92+ uv pip install --system -e .
93+ uv pip install --system --group test
94+ uv pip install --system --group typing
95+
10896 - name : Run mypy
10997 run : |
11098 python -m mypy --install-types --non-interactive --cobertura-xml-report mypy_report cf_xarray/
99+
111100 - name : Upload mypy coverage to Codecov
112101113102 with :
0 commit comments