-
Notifications
You must be signed in to change notification settings - Fork 47
107 lines (93 loc) · 2.63 KB
/
ci.yaml
File metadata and controls
107 lines (93 loc) · 2.63 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
name: CI
on:
push:
branches:
- "main"
pull_request:
branches:
- "*"
schedule:
- cron: "0 13 * * 1"
concurrency:
group: ${{ github.ref }}
cancel-in-progress: true
env:
COLUMNS: 120
jobs:
build:
name: Build (${{ matrix.python-version }}, ${{ matrix.os }}), ${{ matrix.env }}
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: ["ubuntu-latest"]
python-version: ["3.11", "3.13"]
env: ["test"]
include:
- env: "test-min-deps"
python-version: "3.11"
os: ubuntu-latest
- env: "test-no-optional"
python-version: "3.13"
os: ubuntu-latest
steps:
- uses: actions/checkout@v6
with:
fetch-depth: 0 # Fetch all history for all branches and tags.
- name: Set up Python
uses: actions/setup-python@v6
with:
python-version: ${{ matrix.python-version }}
- name: Install uv
uses: astral-sh/setup-uv@v7
with:
enable-cache: true
- name: Install dependencies
run: |
uv pip install --system -e .
uv pip install --system --group ${{ matrix.env }}
- name: Run Tests
run: |
pytest -n auto --cov=./ --cov-report=xml
- name: Upload code coverage to Codecov
uses: codecov/codecov-action@v5.5.2
with:
file: ./coverage.xml
flags: unittests
env_vars: RUNNER_OS,PYTHON_VERSION
name: codecov-umbrella
fail_ci_if_error: false
mypy:
name: mypy
runs-on: "ubuntu-latest"
strategy:
matrix:
python-version: ["3.11", "3.13"]
steps:
- uses: actions/checkout@v6
with:
fetch-depth: 0 # Fetch all history for all branches and tags.
- name: Set up Python
uses: actions/setup-python@v6
with:
python-version: ${{ matrix.python-version }}
- name: Install uv
uses: astral-sh/setup-uv@v7
with:
enable-cache: true
- name: Install dependencies
run: |
uv pip install --system -e .
uv pip install --system --group test
uv pip install --system --group typing
- name: Run mypy
run: |
python -m mypy --install-types --non-interactive --cobertura-xml-report mypy_report cf_xarray/
- name: Upload mypy coverage to Codecov
uses: codecov/codecov-action@v5.5.2
with:
file: mypy_report/cobertura.xml
flags: mypy
env_vars: PYTHON_VERSION
name: codecov-umbrella
fail_ci_if_error: false