Repository navigation
291 lines (236 loc) · 7.94 KB
/
Copy pathci.yml
File metadata and controls
291 lines (236 loc) · 7.94 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
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
name: CI
on:
pull_request:
paths-ignore:
- '**.md'
- '**.rst'
- 'LICENSE.txt'
- 'doc/**/*.txt'
- '**/AUTHORS.txt'
- '**/SPONSORS.txt'
- '**/TIPS.txt'
jobs:
tests:
name: Tests
runs-on: ubuntu-26.04
strategy:
fail-fast: false
matrix:
python-version: ["3.11", "3.12", "3.13", "3.14"]
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
- uses: astral-sh/setup-uv@c18668ad3cf93ea998bef934396af7bb5c839dc7 # v10.2.0
with:
version: "latest"
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@5fda3b95a4ea91299a34e894583c3862153e4b97 # v7.0.0
with:
python-version: ${{ matrix.python-version }}
- name: Start MySQL
run: |
sudo systemctl start mysql
- name: Install dependencies
run: uv sync --extra dev,llm,dataframe -p ${{ matrix.python-version }}
- name: Wait for MySQL connection
run: |
while ! mysqladmin ping --host=localhost --port=3306 --user=root --password=root --silent; do
sleep 5
done
- name: Pytest / behave
env:
PYTEST_PASSWORD: root
PYTEST_HOST: 127.0.0.1
TERM: xterm
run: |
./.venv/bin/tox -e py${{ matrix.python-version }}
tests-macos:
name: Tests macOS
runs-on: macos-latest
strategy:
fail-fast: false
matrix:
python-version: ["3.14"]
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
- uses: astral-sh/setup-uv@c18668ad3cf93ea998bef934396af7bb5c839dc7 # v10.2.0
with:
version: "latest"
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@5fda3b95a4ea91299a34e894583c3862153e4b97 # v7.0.0
with:
python-version: ${{ matrix.python-version }}
- name: Set up MySQL
run: |
brew install mysql
- name: Start MySQL
run: |
brew services start mysql
- name: Install dependencies
run: uv sync --extra dev,llm,dataframe -p ${{ matrix.python-version }}
- name: Wait for MySQL connection
run: |
while ! mysqladmin ping --host=localhost --port=3306 --user=root --silent; do
sleep 5
done
- name: Set MySQL test credentials
run: |
$(brew --prefix mysql)/bin/mysqladmin --host=localhost --port=3306 --user=root password root
- name: Pytest / behave
env:
PYTEST_PASSWORD: root
PYTEST_HOST: 127.0.0.1
TERM: xterm
run: |
./.venv/bin/tox -e py${{ matrix.python-version }}
tests-windows:
name: Tests Windows
runs-on: windows-latest
strategy:
fail-fast: false
matrix:
python-version: ['3.14']
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
- uses: astral-sh/setup-uv@c18668ad3cf93ea998bef934396af7bb5c839dc7 # v10.2.0
with:
version: 'latest'
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@5fda3b95a4ea91299a34e894583c3862153e4b97 # v7.0.0
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
shell: cmd
run: uv sync --extra dev,llm,dataframe -p ${{ matrix.python-version }}
- name: Set up MySQL
uses: shogo82148/actions-setup-mysql@1d4ebc60ba1227dd13fc7e6ba845bd3997928d75 # v1.54.2
with:
mysql-version: '9.7'
root-password: root
- name: Run pytest
env:
PYTEST_PASSWORD: root
PYTEST_HOST: 127.0.0.1
run: |
uv run -- coverage run -m pytest
uv run -- coverage report -m --sort=Miss --skip-covered --skip-empty
tests-wsl:
name: Tests WSL (3.14)
runs-on: windows-latest
steps:
- uses: vampire/setup-wsl@d1da7f2c0322a5ee4f24975344f67fc0f5baf364 # v7.0.0
with:
distribution: Ubuntu-24.04
use-cache: 'true'
update: 'false'
additional-packages: |
curl
git
mysql-server
pkg-config
build-essential
python3-pip
- name: Create working directory
shell: wsl-bash {0}
run: |
mkdir -p /root/mycli
- uses: ubuntu/wsl/.github/actions/wsl-checkout@3b7a6b2a43af18aa541eeee1669ac27656630097
with:
distro: Ubuntu-24.04
working-dir: /root/mycli
- name: Install uv
shell: wsl-bash {0}
run: |
export PATH="$HOME/.local/bin:$PATH"
env PYTHONPATH=/usr/local/lib/python3.14/site-packages pip install --upgrade --break-system-packages --prefix=/usr uv
- name: Install dependencies
shell: wsl-bash {0}
run: |
export PATH="$HOME/.local/bin:$PATH"
cd /root/mycli
uv sync --extra dev,llm,dataframe --python 3.14
- name: Start MySQL in WSL
shell: wsl-bash {0}
run: |
sudo service mysql start
- name: Wait for MySQL connection
shell: wsl-bash {0}
run: |
while ! mysqladmin ping --host=localhost --port=3306 --user=root --silent; do
sleep 5
done
- name: Set up MySQL
shell: wsl-bash {0}
run: |
mysqladmin -u root password root
- name: Run pytest
shell: wsl-bash {0}
env:
PYTEST_HOST: 127.0.0.1
PYTEST_USER: root
PYTEST_PASSWORD: root
run: |
export PATH="$HOME/.local/bin:$PATH"
cd /root/mycli
uv run --python 3.14 -- coverage run -m pytest
uv run --python 3.14 -- coverage report -m --sort=Miss --skip-covered --skip-empty
test-no-extras:
name: Tests Without Extras (3.14)
runs-on: ubuntu-26.04
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
- uses: astral-sh/setup-uv@c18668ad3cf93ea998bef934396af7bb5c839dc7 # v10.2.0
with:
version: "latest"
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@5fda3b95a4ea91299a34e894583c3862153e4b97 # v7.0.0
with:
python-version: '3.14'
- name: Start MySQL
run: |
sudo systemctl start mysql
- name: Install dependencies
run: uv sync --extra dev -p python3.14
- name: Wait for MySQL connection
run: |
while ! mysqladmin ping --host=localhost --port=3306 --user=root --password=root --silent; do
sleep 5
done
- name: Pytest / behave
env:
PYTEST_PASSWORD: root
PYTEST_HOST: 127.0.0.1
TERM: xterm
run: |
./.venv/bin/tox -e py3.14
docker-x86-build:
name: Build x86 Docker Image
runs-on: ubuntu-26.04
permissions:
contents: read
# simpler than the steps in publish.yml, because we don't do the slow buildx multiarch
steps:
- name: Checkout repository
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
- name: Build Docker image
id: build
uses: docker/build-push-action@c3c9e263c25d99ce0380d002d59b67737d91b0dc # v7.4.0
with:
context: .
file: docker/Dockerfile
push: false
docker-arm-build:
name: Build ARM Docker Image
runs-on: ubuntu-26.04-arm
permissions:
contents: read
# simpler than the steps in publish.yml, because we don't do the slow buildx multiarch
steps:
- name: Checkout repository
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
- name: Build Docker image
id: build
uses: docker/build-push-action@c3c9e263c25d99ce0380d002d59b67737d91b0dc # v7.4.0
with:
context: .
file: docker/Dockerfile
push: false