-
Notifications
You must be signed in to change notification settings - Fork 0
260 lines (251 loc) · 8.86 KB
/
Copy pathbuild.yml
File metadata and controls
260 lines (251 loc) · 8.86 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
name: Tests
on: [push, pull_request]
jobs:
static:
name: static checks / linters
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
python-version: [3.7, 3.8]
steps:
- uses: actions/checkout@v2
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- name: Cache pip
uses: actions/cache@v2
with:
# This path is specific to Ubuntu
path: ${{ env.pythonLocation }}
# Look to see if there is a cache hit for the setup file
key: ${{ runner.os }}-pip-new2-${{ env.pythonLocation }}-${{ hashFiles('setup.py') }}
restore-keys: |
${{ runner.os }}-pip-new2
${{ runner.os }}-new2
- name: Install numpy
run: pip install -U numpy
- name: Install dependencies
run: pip install --upgrade --upgrade-strategy eager .[full,test]
- name: Install deps for test_autoai_ts_libs
if: ${{ matrix.python-version == 3.7 || matrix.python-version == 3.8 }}
run: pip install --upgrade --upgrade-strategy eager 'autoai-ts-libs'
- name: pre-commit checks
uses: pre-commit/action@v2.0.0
test_matrix:
name: Test
runs-on: ubuntu-latest
needs: [static]
strategy:
fail-fast: false
matrix:
test-case:
- test/test_core_classifiers.py
- test/test_core_regressors.py
- test/test_core_transformers.py
- test/test_core_misc.py
- test/test_core_pipeline.py
- test/test_custom_schemas.py
- test/test_json_pretty_viz.py
- test/test_grammar.py
- test/test_type_checking.py
- test/test_interoperability.py
- test/test_optimizers.py
- test/test_pipeline.py
- test/test_autoai_libs.py
- test/test_autoai_output_consumption.py
- test/test_autogen_lib.py
- test/test_relational.py
- test/test_snapml.py
python-version: [3.7, 3.8]
setup-target: ['.[full,test]']
include:
- test-case: test/test_autoai_ts_libs.py
python-version: 3.8
setup-target: '.[test]'
- test-case: test/test_autogen_lib.py
python-version: 3.6
setup-target: '.[test]'
- test-case: test/test_halving_gridsearchcv.py
python-version: 3.7
setup-target: '.[test]'
- test-case: test/test_lale_lib_versions.py
python-version: 3.7
setup-target: '.[full,test]'
- test-case: test/test_aif360.py
python-version: 3.7
setup-target: '.[full,test]'
steps:
- uses: actions/checkout@v2
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- name: Install system packages
run: sudo apt-get install graphviz swig
- name: Cache pip
uses: actions/cache@v2
with:
# This path is specific to Ubuntu
path: ${{ env.pythonLocation }}
# Look to see if there is a cache hit for the setup file
key: ${{ runner.os }}-pip-new2-${{ env.pythonLocation }}-${{ hashFiles('setup.py') }}
restore-keys: |
${{ runner.os }}-pip-new2
${{ runner.os }}-new2
- name: Install numpy
run: pip install -U numpy
- name: Install dependencies
run: pip install --upgrade --upgrade-strategy eager ${{matrix.setup-target}}
- name: Install deps for test_autoai_output_consumption
if: ${{ matrix.test-case == 'test/test_autoai_output_consumption.py' }}
run: pip install 'scikit-learn==0.23.1' 'lightgbm==3.3.0'
- name: Install deps for test_lale_lib_versions
if: ${{ matrix.test-case == 'test/test_lale_lib_versions.py' }}
run: pip install 'scikit-learn==0.20.3' 'xgboost==0.90'
- name: Install deps for test_halving_gridsearchcv
if: ${{ matrix.test-case == 'test/test_halving_gridsearchcv.py' }}
run: pip install 'scikit-learn==0.24.1'
- name: Install deps for test_autoai_ts_libs
if: ${{ matrix.test-case == 'test/test_autoai_ts_libs.py' }}
run: pip install 'autoai-ts-libs' 'scikit-learn==0.23.2'
- name: Run test
run: py.test -v --capture=tee-sys ${{matrix.test-case}}
test_newer:
name: Test with newest sklearn
runs-on: ubuntu-latest
needs: [static]
strategy:
fail-fast: false
matrix:
test-case:
- test/test_core_classifiers.py
- test/test_core_regressors.py
- test/test_core_transformers.py
python-version: [3.8]
setup-target: ['.']
steps:
- uses: actions/checkout@v2
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- name: Install system packages
run: sudo apt-get install graphviz swig
- name: Cache pip
uses: actions/cache@v2
with:
# This path is specific to Ubuntu
path: ${{ env.pythonLocation }}
# Look to see if there is a cache hit for the setup file
key: ${{ runner.os }}-pip-new2-${{ env.pythonLocation }}-${{ hashFiles('setup.py') }}
restore-keys: |
${{ runner.os }}-pip-new2
${{ runner.os }}-new2
- name: Install numpy
run: pip install -U numpy
- name: Install dependencies
run: pip install --upgrade --upgrade-strategy eager ${{matrix.setup-target}}
- name: Install pytest
run: pip install pytest
- name: Install latest scikit-learn, xgboost, and lightgbm
run: pip install --upgrade --upgrade-strategy eager scikit-learn xgboost lightgbm
- name: Run test
run: py.test -v --capture=tee-sys ${{matrix.test-case}}
test_notebooks:
name: Test Notebooks
needs: [static]
runs-on: ubuntu-latest
env:
ALL_NOTEBOOK_CATEGORIES: demo_ docs_ talk_
strategy:
fail-fast: false
matrix:
category:
- demo_
- docs_
- talk_
python-version: [3.7, 3.8]
setup-target: ['.[full,test]']
test-case: [test/test_notebooks.py]
steps:
- uses: actions/checkout@v2
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- name: Cache pip
uses: actions/cache@v2
with:
# This path is specific to Ubuntu
path: ${{ env.pythonLocation }}
# Look to see if there is a cache hit for the setup file
key: ${{ runner.os }}-pip-new2-${{ env.pythonLocation }}-${{ hashFiles('setup.py') }}
restore-keys: |
${{ runner.os }}-pip-new2
${{ runner.os }}-new2
- name: Install packages
run: sudo apt-get install graphviz swig
- name: Install numpy
run: pip install -U numpy
- name: Install dependencies
run: pip install --upgrade --upgrade-strategy eager ${{matrix.setup-target}}
- name: Run test
run: NOTEBOOK_CATEGORY=${{matrix.category}} py.test -v --capture=tee-sys ${{matrix.test-case}}
test_fairness:
name: Test fairness install
runs-on: ubuntu-latest
needs: [static]
strategy:
fail-fast: false
matrix:
test-case:
- test/test_aif360.py
- test/test_aif360_ensembles.py
python-version: [3.7]
setup-target: ['.[fairness]']
steps:
- uses: actions/checkout@v2
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- name: Install system packages
run: sudo apt-get install graphviz swig
- name: Install numpy
run: pip install -U numpy
- name: Install pytest
run: pip install pytest
- name: Install dependencies
run: pip install --upgrade --upgrade-strategy eager ${{matrix.setup-target}}
- name: Run test
run: py.test -v --capture=tee-sys ${{matrix.test-case}}
deploy:
name: Deploy to TestPyPI
runs-on: ubuntu-latest
# This should run only on the master branch of the main repo
if: github.repository == 'IBM/lale' && github.ref == 'refs/heads/master' && success()
needs: [static, test_matrix, test_notebooks]
strategy:
matrix:
python-version: [3.7]
steps:
- uses: actions/checkout@v2
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: pip install wheel
- name: Build distribution
env:
# integrate with the current system for timestamping versions
TRAVIS: " "
run: python setup.py sdist bdist_wheel
- name: Publish package to TestPyPI
uses: pypa/gh-action-pypi-publish@master
with:
user: __token__
password: ${{ secrets.test_pypi_password }}
repository_url: https://test.pypi.org/legacy/