-
Notifications
You must be signed in to change notification settings - Fork 10
235 lines (213 loc) · 9.42 KB
/
unit_tests.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
# This workflow will run unit tests
name: Run Unit Tests
on:
pull_request:
workflow_dispatch:
jobs:
py_build_tests:
uses: neongeckocom/.github/.github/workflows/python_build_tests.yml@master
skill_object_tests:
strategy:
matrix:
python-version: [ 3.7, 3.8, 3.9, '3.10' ]
runs-on: ubuntu-latest
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: |
python -m pip install --upgrade pip
pip install wheel "cython<3.0.0" # TODO: cython patching https://github.com/yaml/pyyaml/issues/724
pip install --no-build-isolation pyyaml~=5.4 # TODO: patching https://github.com/yaml/pyyaml/issues/724
sudo apt update
sudo apt install gcc libfann-dev libsndfile1
pip install .[test,network]
- name: Test Skills Objects
run: |
pytest tests/neon_skill_tests.py --doctest-modules --junitxml=tests/skill-object-test-results.xml
- name: Upload skill test results
uses: actions/upload-artifact@v4
with:
name: skill-test-results-${{ matrix.python-version }}
path: tests/skill-object-test-results.xml
unit_tests:
strategy:
matrix:
python-version: [3.7, 3.8, 3.9, '3.10']
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Install Sound Library
run: |
sudo apt-get update
sudo apt-get install libsndfile1
- name: Set up python ${{ matrix.python-version }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
sudo apt update
sudo apt install gcc libfann-dev
python -m pip install --upgrade pip
pip install wheel "cython<3.0.0" # TODO: cython patching https://github.com/yaml/pyyaml/issues/724
pip install --no-build-isolation pyyaml~=5.4 # TODO: patching https://github.com/yaml/pyyaml/issues/724
pip install .[test,audio,network,configuration]
- name: Change Test File Permissions
run: |
sudo chown -R nobody:nogroup tests/configuration/unwritable_path
- name: Test Parse Utils
run: |
pytest tests/parse_util_tests.py --doctest-modules --junitxml=tests/parse-util-test-results.xml
- name: Upload parse utils test results
uses: actions/upload-artifact@v4
with:
name: parse-util-test-results-${{ matrix.python-version }}
path: tests/parse-util-test-results.xml
- name: Test Web Utils
run: |
pytest tests/web_util_tests.py --doctest-modules --junitxml=tests/web-util-test-results.xml
- name: Upload web utils test results
uses: actions/upload-artifact@v4
with:
name: web-util-test-results-${{ matrix.python-version }}
path: tests/web-util-test-results.xml
- name: Test Net Utils
run: |
pytest tests/net_util_tests.py --doctest-modules --junitxml=tests/net-util-test-results.xml
- name: Upload net utils test results
uses: actions/upload-artifact@v4
with:
name: net-util-test-results-${{ matrix.python-version }}
path: tests/net-util-test-results.xml
- name: Test Search Utils
run: |
pytest tests/search_util_tests.py --doctest-modules --junitxml=tests/search-util-test-results.xml
- name: Upload search utils test results
uses: actions/upload-artifact@v4
with:
name: search-util-test-results-${{ matrix.python-version }}
path: tests/search-util-test-results.xml
- name: Test Location Utils
run: |
pytest tests/location_util_tests.py --doctest-modules --junitxml=tests/location-util-test-results.xml
- name: Upload location utils test results
uses: actions/upload-artifact@v4
with:
name: location-util-test-results-${{ matrix.python-version }}
path: tests/location-util-test-results.xml
- name: Test Configuration Utils
run: |
pytest tests/configuration_util_tests.py --doctest-modules --junitxml=tests/configuration-util-test-results.xml
- name: Upload configuration utils test results
uses: actions/upload-artifact@v4
with:
name: configuration-util-test-results-${{ matrix.python-version }}
path: tests/configuration-util-test-results.xml
- name: Test Message Utils
run: |
pytest tests/message_util_tests.py --doctest-modules --junitxml=tests/message-util-test-results.xml
- name: Upload message utils test results
uses: actions/upload-artifact@v4
with:
name: message-util-test-results-${{ matrix.python-version }}
path: tests/message-util-test-results.xml
- name: Test Log Utils
run: |
pytest tests/log_util_tests.py --doctest-modules --junitxml=tests/log-util-test-results.xml
- name: Upload log utils test results
uses: actions/upload-artifact@v4
with:
name: log-util-test-results-${{ matrix.python-version }}
path: tests/log-util-test-results.xml
- name: Test Packaging Utils
run: |
pytest tests/packaging_util_tests.py --doctest-modules --junitxml=tests/packaging-util-test-results.xml
- name: Upload packaging utils test results
uses: actions/upload-artifact@v4
with:
name: packaging-util-test-results-${{ matrix.python-version }}
path: tests/packaging-util-test-results.xml
- name: Test Authentication Utils
run: |
pytest tests/authentication_util_tests.py --doctest-modules --junitxml=tests/authentication-util-test-results.xml
- name: Upload authentication utils test results
uses: actions/upload-artifact@v4
with:
name: authentication-util-test-results-${{ matrix.python-version }}
path: tests/authentication-util-test-results.xml
- name: Test Metric Utils
run: |
pytest tests/metric_util_tests.py --doctest-modules --junitxml=tests/metric-util-test-results.xml
- name: Upload metric utils test results
uses: actions/upload-artifact@v4
with:
name: metric-util-test-results-${{ matrix.python-version }}
path: tests/metric-util-test-results.xml
- name: Test Cache Utils
run: |
pytest tests/cache_util_tests.py --doctest-modules --junitxml=tests/cache-util-test-results.xml
- name: Upload cache utils test results
uses: actions/upload-artifact@v4
with:
name: cache-util-test-results-${{ matrix.python-version }}
path: tests/cache-util-test-results.xml
- name: Test MQ Utils
run: |
pytest tests/mq_util_tests.py --doctest-modules --junitxml=tests/mq-util-test-results.xml
- name: Upload MQ utils test results
uses: actions/upload-artifact@v4
with:
name: mq-util-test-results-${{ matrix.python-version }}
path: tests/mq-util-test-results.xml
- name: Test Validator Utils
run: |
pytest tests/validator_util_tests.py --doctest-modules --junitxml=tests/validator-util-test-results.xml
- name: Upload validator utils test results
uses: actions/upload-artifact@v4
with:
name: validator-util-test-results-${{ matrix.python-version }}
path: tests/validator-util-test-results.xml
- name: Test Signal Utils
run: |
pytest tests/signal_util_tests.py --doctest-modules --junitxml=tests/signal-util-test-results.xml
- name: Upload signal utils test results
uses: actions/upload-artifact@v4
with:
name: signal-util-test-results-${{ matrix.python-version }}
path: tests/signal-util-test-results.xml
- name: Test Messagebus Utils
run: |
pytest tests/messagebus_util_tests.py --doctest-modules --junitxml=tests/messagebus-util-test-results.xml
- name: Upload messagebus utils test results
uses: actions/upload-artifact@v4
with:
name: messagebus-util-test-results-${{ matrix.python-version }}
path: tests/messagebus-util-test-results.xml
- name: Test User Utils
run: |
pytest tests/user_util_tests.py --doctest-modules --junitxml=tests/user-util-test-results.xml
- name: Upload user utils test results
uses: actions/upload-artifact@v4
with:
name: user-util-test-results-${{ matrix.python-version }}
path: tests/user-util-test-results.xml
- name: Test Language Utils
run: |
pytest tests/language_util_tests.py --doctest-modules --junitxml=tests/language-util-test-results.xml
- name: Upload language utils test results
uses: actions/upload-artifact@v4
with:
name: language-util-test-results-${{ matrix.python-version }}
path: tests/language-util-test-results.xml
- name: Test Hana Utils
run: |
pytest tests/hana_util_tests.py --doctest-modules --junitxml=tests/hana-util-test-results.xml
- name: Upload hana utils test results
uses: actions/upload-artifact@v4
with:
name: hana-util-test-results-${{ matrix.python-version }}
path: tests/hana-util-test-results.xml