-
-
Notifications
You must be signed in to change notification settings - Fork 97
Expand file tree
/
Copy pathazure-pipelines.yml
More file actions
200 lines (174 loc) · 8.48 KB
/
azure-pipelines.yml
File metadata and controls
200 lines (174 loc) · 8.48 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
# ----------------------------------------------------------------------
# Tests: CI - Azure Pipelines
# Copyright (C) 2018-2025 Ye Lei (叶磊)
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <https://www.gnu.org/licenses/>.
# ----------------------------------------------------------------------
variables:
PIP_CACHE_DIR: $(Pipeline.Workspace)/.pip
jobs:
# Windows
- job: "Windows"
pool:
vmImage: windows-2022
steps:
- task: UsePythonVersion@0
inputs:
versionSpec: '3.11'
architecture: 'x64'
- task: Cache@2
inputs:
key: 'pip | "$(Agent.OS)" | requirements/requirements_tests.txt'
restoreKeys: |
pip | "$(Agent.OS)"
path: $(PIP_CACHE_DIR)
displayName: Cache pip packages
- script: |
pip install --upgrade pip setuptools
pip install --requirement requirements/requirements_tests.txt
:: Download models and data files
python utils/wl_download_ci.py
python utils/wl_download_modern_botok.py
python utils/wl_download_pkuseg.py
displayName: 'Install dependencies'
- script: |
:: Run some tests separately to reduce memory usage
pytest tests/tests_nlp/test_dependency_parsing.py
pytest tests/tests_nlp/test_lemmatization.py
pytest tests/tests_nlp/test_matching.py
pytest tests/tests_nlp/test_nlp_utils.py
pytest tests/tests_nlp/test_pos_tagging.py
pytest tests/tests_nlp/test_sentence_tokenization.py
pytest tests/tests_nlp/test_sentiment_analysis.py
pytest tests/tests_nlp/test_stop_word_lists.py
pytest tests/tests_nlp/test_syl_tokenization.py
pytest tests/tests_nlp/test_texts.py
pytest tests/tests_nlp/test_token_processing.py
pytest tests/tests_nlp/test_word_detokenization.py
pytest tests/tests_nlp/test_word_tokenization.py
pytest tests/test_colligation_extractor.py
pytest tests/test_collocation_extractor.py
pytest tests/test_concordancer.py
pytest tests/test_concordancer_parallel.py
pytest tests/test_dependency_parser.py
pytest tests/test_keyword_extractor.py
pytest tests/test_main.py
pytest tests/test_ngram_generator.py
pytest tests/test_profiler.py
pytest tests/test_wordlist_generator.py
pytest --ignore=tests/tests_nlp --ignore=tests/test_colligation_extractor.py --ignore=tests/test_collocation_extractor.py --ignore=tests/test_concordancer.py --ignore=tests/test_concordancer_parallel.py --ignore=tests/test_dependency_parser.py --ignore=tests/test_keyword_extractor.py --ignore=tests/test_main.py --ignore=tests/test_ngram_generator.py --ignore=tests/test_profiler.py --ignore=tests/test_wordlist_generator.py
displayName: 'Run tests'
# macOS
- job: "macOS"
pool:
vmImage: macOS-13
steps:
- task: UsePythonVersion@0
inputs:
versionSpec: '3.11'
- task: Cache@2
inputs:
key: 'pip | "$(Agent.OS)" | requirements/requirements_tests.txt'
restoreKeys: |
pip | "$(Agent.OS)"
path: $(PIP_CACHE_DIR)
displayName: Cache pip packages
- script: |
pip3 install --upgrade pip setuptools
pip3 install --requirement requirements/requirements_tests_macos.txt
# Download models and data files
python3 utils/wl_download_ci.py
python3 utils/wl_download_modern_botok.py
python3 utils/wl_download_pkuseg.py
displayName: 'Install dependencies'
- script: |
# Run some tests separately to reduce memory usage
pytest tests/tests_nlp/test_dependency_parsing.py
pytest tests/tests_nlp/test_lemmatization.py
pytest tests/tests_nlp/test_matching.py
pytest tests/tests_nlp/test_nlp_utils.py
pytest tests/tests_nlp/test_pos_tagging.py
pytest tests/tests_nlp/test_sentence_tokenization.py
pytest tests/tests_nlp/test_sentiment_analysis.py
pytest tests/tests_nlp/test_stop_word_lists.py
pytest tests/tests_nlp/test_syl_tokenization.py
pytest tests/tests_nlp/test_texts.py
pytest tests/tests_nlp/test_token_processing.py
pytest tests/tests_nlp/test_word_detokenization.py
pytest tests/tests_nlp/test_word_tokenization.py
pytest tests/test_colligation_extractor.py
pytest tests/test_collocation_extractor.py
pytest tests/test_concordancer.py
pytest tests/test_concordancer_parallel.py
pytest tests/test_dependency_parser.py
pytest tests/test_keyword_extractor.py
pytest tests/test_main.py
pytest tests/test_ngram_generator.py
pytest tests/test_profiler.py
pytest tests/test_wordlist_generator.py
pytest --ignore=tests/tests_nlp --ignore=tests/test_colligation_extractor.py --ignore=tests/test_collocation_extractor.py --ignore=tests/test_concordancer.py --ignore=tests/test_concordancer_parallel.py --ignore=tests/test_dependency_parser.py --ignore=tests/test_keyword_extractor.py --ignore=tests/test_main.py --ignore=tests/test_ngram_generator.py --ignore=tests/test_profiler.py --ignore=tests/test_wordlist_generator.py
displayName: 'Run tests'
# Linux
- job: "Linux"
pool:
vmImage: ubuntu-22.04
steps:
- task: UsePythonVersion@0
inputs:
versionSpec: '3.11'
- task: Cache@2
inputs:
key: 'pip | "$(Agent.OS)" | requirements/requirements_tests.txt'
restoreKeys: |
pip | "$(Agent.OS)"
path: $(PIP_CACHE_DIR)
displayName: Cache pip packages
- script: |
pip3.11 install --upgrade pip setuptools
pip3.11 install --requirement requirements/requirements_tests.txt
# Download models and data files
python3.11 utils/wl_download_ci.py
python3.11 utils/wl_download_modern_botok.py
python3.11 utils/wl_download_pkuseg.py
displayName: 'Install dependencies'
- script: |
# Fix PyQt
export QT_QPA_PLATFORM=offscreen
# Run some tests separately to reduce memory usage
pytest tests/tests_nlp/test_dependency_parsing.py
pytest tests/tests_nlp/test_lemmatization.py
pytest tests/tests_nlp/test_matching.py
pytest tests/tests_nlp/test_nlp_utils.py
pytest tests/tests_nlp/test_pos_tagging.py
pytest tests/tests_nlp/test_sentence_tokenization.py
pytest tests/tests_nlp/test_sentiment_analysis.py
pytest tests/tests_nlp/test_stop_word_lists.py
pytest tests/tests_nlp/test_syl_tokenization.py
pytest tests/tests_nlp/test_texts.py
pytest tests/tests_nlp/test_token_processing.py
pytest tests/tests_nlp/test_word_detokenization.py
pytest tests/tests_nlp/test_word_tokenization.py
pytest tests/test_colligation_extractor.py
pytest tests/test_collocation_extractor.py
pytest tests/test_concordancer.py
pytest tests/test_concordancer_parallel.py
pytest tests/test_dependency_parser.py
pytest tests/test_keyword_extractor.py
pytest tests/test_main.py
pytest tests/test_ngram_generator.py
pytest tests/test_profiler.py
pytest tests/test_wordlist_generator.py
# Exclude tests_settings on Linux
pytest --ignore=tests/tests_nlp --ignore=tests/test_colligation_extractor.py --ignore=tests/test_collocation_extractor.py --ignore=tests/test_concordancer.py --ignore=tests/test_concordancer_parallel.py --ignore=tests/test_dependency_parser.py --ignore=tests/test_keyword_extractor.py --ignore=tests/test_main.py --ignore=tests/test_ngram_generator.py --ignore=tests/test_profiler.py --ignore=tests/test_wordlist_generator.py --ignore=tests/tests_settings
displayName: 'Run tests'