-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
343 lines (284 loc) · 8.93 KB
/
test.yml
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
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
name: Install and test
on:
push:
branches:
- main
pull_request:
branches:
- main
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
code-quality:
name: code-quality
runs-on: ubuntu-latest
steps:
- name: repository checkout step
uses: actions/checkout@v4
- name: python environment step
uses: actions/setup-python@v5
with:
python-version: "3.11"
- name: install pre-commit
run: python3 -m pip install pre-commit
- id: changed-files
name: identify modified files
uses: tj-actions/changed-files@v44
- name: run pre-commit hooks on modified files
run: pre-commit run --color always --files ${{ steps.changed-files.outputs.all_changed_files }} --show-diff-on-failure
- name: check missing __init__ files
run: build_tools/fail_on_missing_init_files.sh
shell: bash
run-notebook-examples:
needs: code-quality
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: 3.9
- name: Install dependencies
run: |
python -m pip install --upgrade pip
python -m pip install .[all_extras,binder,dev,mlflow]
- name: Run example notebooks
run: build_tools/run_examples.sh
shell: bash
run-blogpost-examples:
needs: code-quality
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: 3.9
- name: Install dependencies
run: |
python -m pip install --upgrade pip
python -m pip install .[all_extras,binder,dev,mlflow]
- name: Run example notebooks
run: build_tools/run_blogposts.sh
shell: bash
detect-package-change:
needs: code-quality
name: detect package changes
runs-on: ubuntu-latest
permissions:
pull-requests: read
outputs:
sktime: ${{ steps.filter.outputs.sktime }}
steps:
- uses: actions/checkout@v4
- uses: dorny/paths-filter@v3
id: filter
with:
filters: |
sktime:
- sktime/**
- pyproject.toml
test-nodevdeps:
needs: detect-package-change
if: ${{ needs.detect-package-change.outputs.sktime == 'true' }}
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: 3.9
- name: Display Python version
run: python -c "import sys; print(sys.version)"
- name: Install sktime and dependencies
run: |
python -m pip install .
- name: Run pytest-free tests
run: |
python sktime/_nopytest_tests.py
test-nosoftdeps:
needs: detect-package-change
if: ${{ needs.detect-package-change.outputs.sktime == 'true' }}
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: 3.9
- name: Display Python version
run: python -c "import sys; print(sys.version)"
- name: Install sktime and dependencies
run: |
python -m pip install .[dev]
- name: Show dependencies
run: python -m pip list
- name: Run tests
run: make PYTESTOPTIONS="--cov --cov-report=xml --timeout=600" test_softdeps
test-nosoftdeps-full:
needs: test-nosoftdeps
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- run: git remote set-branches origin 'main'
- run: git fetch --depth 1
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: 3.9
- name: Display Python version
run: python -c "import sys; print(sys.version)"
- name: Install sktime and dependencies
run: |
python -m pip install .[dev]
- name: Show dependencies
run: python -m pip list
- name: Run tests
run: make PYTESTOPTIONS="--cov --cov-report=xml --timeout=600" test_softdeps_full
test-mlflow:
needs: test-nosoftdeps
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: 3.9
- name: Display Python version
run: python -c "import sys; print(sys.version)"
- name: Install sktime and dependencies
run: |
python -m pip install .[all_extras,dev,mlflow_tests] --no-cache-dir
- name: Show dependencies
run: python -m pip list
- name: Run tests
run: make PYTESTOPTIONS="--cov --cov-report=xml --timeout=600" test_mlflow
test-cython-estimators:
needs: test-nosoftdeps
runs-on: macos-13
steps:
- uses: actions/checkout@v4
- run: git remote set-branches origin 'main'
- run: git fetch --depth 1
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: 3.9
- name: Display Python version
run: python -c "import sys; print(sys.version)"
- name: Install OS packages
run: brew install libomp
- name: Install sktime and dependencies
run: |
python -m pip install .[dev,cython_extras] --no-cache-dir
- name: Show dependencies
run: python -m pip list
- name: Run tests
run: make PYTESTOPTIONS="--cov --cov-report=xml --only_cython_estimators=True --matrixdesign=False --timeout=600" test_check_suite
- name: Publish code coverage
uses: codecov/codecov-action@v4
with:
token: ${{ secrets.CODECOV_TOKEN }}
detect:
needs: test-nosoftdeps
name: detect changes
runs-on: ubuntu-latest
permissions:
pull-requests: read
outputs:
datasets: ${{ steps.filter.outputs.datasets }}
pyproject: ${{ steps.filter.outputs.pyproject }}
steps:
- uses: actions/checkout@v4
- uses: dorny/paths-filter@v3
id: filter
with:
filters: |
datasets:
- sktime/base/**
- sktime/datasets/**
pyproject:
- pyproject.toml
test-base:
needs: test-nosoftdeps
name: base
uses: ./.github/workflows/test_base.yml
secrets: inherit
test-module:
needs: test-nosoftdeps
name: module
uses: ./.github/workflows/test_module.yml
secrets: inherit
test-other:
needs: test-nosoftdeps
name: other
uses: ./.github/workflows/test_other.yml
secrets: inherit
test-datasets:
needs: detect
name: datasets
if: ${{ needs.detect.outputs.datasets == 'true' }}
uses: ./.github/workflows/test_datasets.yml
secrets: inherit
test-full:
needs: test-nosoftdeps
strategy:
fail-fast: false # to not fail all combinations if just one fail
matrix:
python-version: ['3.8', '3.9', '3.10', '3.11', '3.12']
os: [ubuntu-latest, macos-13, windows-latest]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
- run: git remote set-branches origin 'main'
- run: git fetch --depth 1
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Display Python version
run: python -c "import sys; print(sys.version)"
- name: Install sktime and dependencies
run: |
python -m pip install .[all_extras_pandas2,dev,dl] --no-cache-dir
- name: Show dependencies
run: python -m pip list
- name: Show available branches
run: git branch -a
- name: Run tests
run: make test_without_datasets
- name: Publish code coverage
uses: codecov/codecov-action@v4
with:
token: ${{ secrets.CODECOV_TOKEN }}
test-unix-pandas1:
needs: test-nosoftdeps
strategy:
fail-fast: false
matrix:
python-version: ['3.8', '3.9', '3.10', '3.11', '3.12']
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- run: git remote set-branches origin 'main'
- run: git fetch --depth 1
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Display Python version
run: python -c "import sys; print(sys.version)"
- name: Install sktime and dependencies
run: |
python -m pip install .[all_extras,dev,pandas1] --no-cache-dir
- name: Show dependencies
run: python -m pip list
- name: Show available branches
run: git branch -a
- name: Run tests
run: make test_without_datasets
- name: Publish code coverage
uses: codecov/codecov-action@v4
with:
token: ${{ secrets.CODECOV_TOKEN }}