forked from intel/dffml
-
Notifications
You must be signed in to change notification settings - Fork 0
298 lines (288 loc) · 10 KB
/
testing.yml
File metadata and controls
298 lines (288 loc) · 10 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
292
293
294
295
296
297
298
name: Tests
on:
push:
paths-ignore:
- 'docs/arch/**'
pull_request:
paths-ignore:
- 'docs/arch/**'
schedule:
- cron: '0 3 * * *'
jobs:
lint:
runs-on: ubuntu-latest
strategy:
fail-fast: false
max-parallel: 40
matrix:
check: [changelog, whitespace, style, commit, import, docs, lines]
python-version: [3.7]
node-version: [12.x]
steps:
- uses: actions/checkout@v2
- name: Checkout full upstream repo
run: |
git remote set-url origin https://github.com/intel/dffml
git fetch --prune --unshallow
git fetch --depth=1 origin +refs/tags/*:refs/tags/*
git config --global user.email "dffml@intel.com"
git config --global user.name "DFFML CI/CD"
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node-version }}
- name: Get pip cache
id: pip-cache
run: |
python -c "from pip._internal.locations import USER_CACHE_DIR; print('::set-output name=dir::' + USER_CACHE_DIR)"
- name: pip cache
uses: actions/cache@v1
with:
path: ${{ steps.pip-cache.outputs.dir }}
key: ${{ runner.os }}-pip-${{ hashFiles('**/setup.py') }}
restore-keys: |
${{ runner.os }}-pip-
- name: Install dependencies
run: |
set -x
./.ci/deps.sh ${{ matrix.check }}
- name: Run check
run: |
export GITHUB_TOKEN=${{ secrets.GITHUB_TOKEN }}
SSH_DFFML_GH_PAGES=${{ secrets.SSH_DFFML_GH_PAGES }} ./.ci/run.sh ${{ matrix.check }}
container:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Install dependencies
run: |
set -x
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -
sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable"
sudo apt-get update && sudo apt-get install -y docker-ce docker-ce-cli containerd.io
- name: Run check
run: |
./.ci/run.sh container
test:
runs-on: ubuntu-latest
strategy:
fail-fast: false
max-parallel: 100
matrix:
plugin:
- .
- examples/shouldi
- model/daal4py
- model/tensorflow
- model/tensorflow_hub
- model/scratch
- model/scikit
- model/vowpalWabbit
- model/autosklearn
- model/spacy
- model/pytorch
- model/xgboost
- operations/binsec
- operations/data
- operations/deploy
- operations/image
- operations/nlp
- source/mysql
- feature/git
- feature/auth
- service/http
- configloader/yaml
- configloader/image
python-version: [3.7, 3.8]
steps:
- uses: actions/checkout@v2
- name: Checkout full upstream repo
run: |
git remote set-url origin https://github.com/intel/dffml
git fetch --prune --unshallow
git fetch --depth=1 origin +refs/tags/*:refs/tags/*
git config --global user.email "dffml@intel.com"
git config --global user.name "DFFML CI/CD"
- name: Remove unused software
run: |
sudo rm -rf /usr/share/dotnet /usr/local/lib/android /opt/ghc
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- name: Get pip cache
id: pip-cache
run: |
python -c "from pip._internal.locations import USER_CACHE_DIR; print('::set-output name=dir::' + USER_CACHE_DIR)"
- name: pip cache
uses: actions/cache@v1
with:
path: ${{ steps.pip-cache.outputs.dir }}
key: ${{ runner.os }}-pip-${{ hashFiles('**/setup.py') }}
restore-keys: |
${{ runner.os }}-pip-
- name: shouldi test binary cache
uses: actions/cache@v1
with:
path: examples/shouldi/tests/downloads
key: ${{ hashFiles('examples/shouldi/tests/binaries.py') }}
restore-keys: |
${{ runner.os }}-shouldi-test-binaries-
- name: Install dependencies
run: |
set -x
./.ci/deps.sh ${{ matrix.plugin }}
- name: Test
run: |
set -x
export GITHUB_TOKEN=${{ secrets.GITHUB_TOKEN }}
export PYTHON=python${{ matrix.python-version }}
export PLUGIN=${{ matrix.plugin }}
export LOGGING=debug
export PATH="${HOME}/.local/bin:${PATH}"
export PYPI_TOKENS=$(mktemp)
cat > ${PYPI_TOKENS} <<EOF
examples/shouldi=${{ secrets.PYPI_SHOULDI }}
model/daal4py=${{ secrets.PYPI_MODEL_DAAL4PY }}
model/tensorflow=${{ secrets.PYPI_MODEL_TENSORFLOW }}
model/tensorflow_hub=${{ secrets.PYPI_MODEL_TENSORFLOW_HUB }}
model/scratch=${{ secrets.PYPI_MODEL_SCRATCH }}
model/scikit=${{ secrets.PYPI_MODEL_SCIKIT }}
model/spacy=${{ secrets.PYPI_MODEL_SPACY }}
model/vowpalWabbit=${{ secrets.PYPI_MODEL_VOWPALWABBIT }}
model/autosklearn=${{ secrets.PYPI_MODEL_AUTOSKLEARN }}
model/pytorch=${{ secrets.PYPI_MODEL_PYTORCH }}
model/xgboost=${{ secrets.PYPI_MODEL_XGBOOST }}
source/mysql=${{ secrets.PYPI_SOURCE_MYSQL }}
feature/git=${{ secrets.PYPI_FEATURE_GIT }}
feature/auth=${{ secrets.PYPI_FEATURE_AUTH }}
operations/binsec=${{ secrets.PYPI_OPERATIONS_BINSEC }}
operations/data=${{ secrets.PYPI_OPERATIONS_DATA }}
operations/deploy=${{ secrets.PYPI_OPERATIONS_DEPLOY }}
operations/image=${{ secrets.PYPI_OPERATIONS_IMAGE }}
operations/nlp=${{ secrets.PYPI_OPERATIONS_NLP }}
service/http=${{ secrets.PYPI_SERVICE_HTTP }}
configloader/yaml=${{ secrets.PYPI_CONFIG_YAML }}
configloader/image=${{ secrets.PYPI_CONFIG_IMAGE }}
EOF
export TWINE_USERNAME=__token__
if [ "x${PLUGIN}" = "x." ]; then
export TWINE_PASSWORD=${{ secrets.PYPI_DFFML }}
else
export TWINE_PASSWORD=$(grep "${PLUGIN}=" "${PYPI_TOKENS}" | sed 's/^[^=]*=//g')
fi
rm ${PYPI_TOKENS}
./.ci/run.sh "${PLUGIN}"
if [ "x${PLUGIN}" = "x." ]; then
CODECOV_TOKEN=${{ secrets.CODECOV_TOKEN }} codecov
fi
tutorials:
runs-on: ubuntu-latest
strategy:
fail-fast: false
max-parallel: 100
matrix:
python-version: [3.7]
docs:
- docs/cli.rst
- docs/examples/dataflows.rst
- docs/examples/integration.rst
- docs/examples/or_covid_data_by_county.rst
- docs/examples/shouldi.rst
- docs/examples/innersource/swportal.rst
- docs/examples/innersource/microservice.rst
- docs/examples/icecream_sales.rst
- docs/examples/data_cleanup/data_cleanup.rst
- docs/examples/data_cleanup/data_cleanup_classfication.rst
- docs/installation.rst
- docs/troubleshooting.rst
- docs/tutorials/accuracy/mse.rst
- docs/tutorials/dataflows/io.rst
- docs/tutorials/dataflows/nlp.rst
- docs/tutorials/models/iris.rst
- docs/tutorials/models/package.rst
- docs/tutorials/models/docs.rst
- docs/tutorials/models/slr.rst
- docs/tutorials/sources/complex.rst
- docs/tutorials/sources/file.rst
steps:
- uses: actions/checkout@v2
- name: Checkout full upstream repo
run: |
git remote set-url origin https://github.com/intel/dffml
git fetch --prune --unshallow
git fetch --depth=1 origin +refs/tags/*:refs/tags/*
git config --global user.email "dffml@intel.com"
git config --global user.name "DFFML CI/CD"
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- name: Get pip cache
id: pip-cache
run: |
python -c "from pip._internal.locations import USER_CACHE_DIR; print('::set-output name=dir::' + USER_CACHE_DIR)"
- name: pip cache
uses: actions/cache@v1
with:
path: ${{ steps.pip-cache.outputs.dir }}
key: ${{ runner.os }}-pip-${{ hashFiles('**/setup.py') }}
restore-keys: |
${{ runner.os }}-pip-
- name: Install dependencies
run: |
set -x
./.ci/deps.sh .
- name: Test
run: |
set -x
export GITHUB_TOKEN=${{ secrets.GITHUB_TOKEN }}
export PYTHON=python${{ matrix.python-version }}
export PLUGIN=${{ matrix.plugin }}
export LOGGING=debug
export PATH="${HOME}/.local/bin:${PATH}"
./.ci/run.sh consoletest ${{ matrix.docs }}
macos:
runs-on: macos-latest
strategy:
fail-fast: false
matrix:
python-version: [3.7, 3.8]
steps:
- uses: actions/checkout@v2
- name: Checkout full upstream repo
run: |
git remote set-url origin https://github.com/intel/dffml
git fetch --prune --unshallow
git config --global user.email "dffml@intel.com"
git config --global user.name "DFFML CI/CD"
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- name: Get pip cache
id: pip-cache
run: |
python -c "from pip._internal.locations import USER_CACHE_DIR; print('::set-output name=dir::' + USER_CACHE_DIR)"
- name: pip cache
uses: actions/cache@v1
with:
path: ${{ steps.pip-cache.outputs.dir }}
key: ${{ runner.os }}-pip-${{ hashFiles('**/setup.py') }}
restore-keys: |
${{ runner.os }}-pip-
- name: Setup DFFML
run: |
pip install -U pip setuptools wheel
pip install -e .[dev]
dffml service dev install -skip model/daal4py
# XGBoost requires libomp on OSX
brew install libomp
- name: Test
run: |
python -m unittest discover -v
python -m pip freeze