-
Notifications
You must be signed in to change notification settings - Fork 31
/
azure-pipelines.yml
96 lines (86 loc) · 2.42 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
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
trigger:
- main
jobs:
- job: linux
pool:
vmImage: 'ubuntu-latest'
strategy:
matrix:
Python36:
python.version: '3.6'
Python36debug:
python.version: '3.6'
myenv: LOGLEVEL=DEBUG EXACT_PIP_VERSIONS=1
Python37:
python.version: '3.7'
Python38:
python.version: '3.8'
Python39:
python.version: '3.9'
Python310:
python.version: '3.10'
steps:
- task: UsePythonVersion@0
inputs:
versionSpec: '$(python.version)'
displayName: 'Use Python $(python.version)'
- script: |
python -m pip install --upgrade pip
if [ ! -z "$(myenv)" ]; then
export $(myenv)
fi
if [ ! -z "$EXACT_PIP_VERSIONS" ]; then
echo "Installing exact versions of dependencies"
echo "Note: using 3.6 because packages are deprecating 3.5 support"
pip install -r requirements.txt
fi
pip --use-feature=in-tree-build install . .[test]
displayName: 'Install dependencies'
- script: |
pip install pytest pytest-azurepipelines
if [ ! -z "$(myenv)" ]; then
export $(myenv)
fi
make test_coverage
displayName: 'pytest'
- script: |
pip install coveralls
export CIRCLE_BRANCH=$BUILD_SOURCEBRANCH
coveralls
displayName: 'coveralls'
env:
CIRCLECI: 1
CIRCLE_BUILD_NUM: $(Build.BuildNumber)
COVERALLS_REPO_TOKEN: $(coveralls_repo_token)
- job: macos
pool:
vmImage: 'macOS-latest'
strategy:
matrix:
Python38:
python.version: '3.8'
steps:
- task: UsePythonVersion@0
inputs:
versionSpec: '$(python.version)'
displayName: 'Use Python $(python.version)'
- script: |
python -m pip install --upgrade pip
pip --use-feature=in-tree-build install . .[test]
displayName: 'Install dependencies'
- script: |
pip install pytest pytest-azurepipelines
if [ ! -z "$(myenv)" ]; then
export $(myenv)
fi
make test_coverage
displayName: 'pytest'
- script: |
pip install coveralls
export CIRCLE_BRANCH=$BUILD_SOURCEBRANCH
coveralls
displayName: 'coveralls'
env:
CIRCLECI: 1
CIRCLE_BUILD_NUM: $(Build.BuildNumber)
COVERALLS_REPO_TOKEN: $(coveralls_repo_token)