forked from pavlin-policar/openTSNE
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathazure-pipelines.yml
63 lines (53 loc) · 1.7 KB
/
azure-pipelines.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
variables:
AZURE_BUILD: true
trigger:
- master
jobs:
- job: 'Test'
displayName: 'Unit tests'
pool:
vmImage: $(image.name)
strategy:
matrix:
linux-python36:
image.name: 'ubuntu-16.04'
python.version: '3.6'
linux-python37:
image.name: 'ubuntu-16.04'
python.version: '3.7'
osx-python36:
image.name: 'macos-10.13'
python.version: '3.6'
osx-python37:
image.name: 'macos-10.13'
python.version: '3.7'
windows-python36:
image.name: 'vs2017-win2016'
python.version: '3.6'
windows-python37:
image.name: 'vs2017-win2016'
python.version: '3.7'
steps:
- task: UsePythonVersion@0
inputs:
versionSpec: '$(python.version)'
architecture: 'x64'
displayName: 'Use Python $(python.version)'
- script: |
python -m pip install --upgrade pip
python -m pip install flake8 pytest
python -m pip install numpy
displayName: 'Install job dependencies'
# stop the build if there are Python syntax errors or undefined names
- script: flake8 . --count --select=E901,E999,F821,F822,F823 --show-source --statistics
displayName: 'Check for syntax errors'
- script: pip install .
displayName: 'Install package'
# Since Python automatically adds `cwd` to `sys.path`, it's important we remove the local folder
# containing our code from the working directory. Otherwise, the tests will use the local copy
# instead of the installed package. We can easily achieve this by renaming the source folder.
- bash: mv openTSNE src
displayName: 'Remove source files from path'
- script: pytest -v
timeoutInMinutes: 15
displayName: 'Run unit tests'