-
Notifications
You must be signed in to change notification settings - Fork 0
/
azure-pipelines.yml
46 lines (38 loc) · 1.23 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
jobs:
- job: Build_and_Test
displayName: Build and Test
condition: succeeded()
pool:
name: Hosted Ubuntu 1604
strategy:
matrix:
Python36:
python.version: '3.6'
Python37:
python.version: '3.7'
maxParallel: 3
steps:
- task: UsePythonVersion@0
displayName: 'Use Python $(python.version)'
inputs:
versionSpec: '$(python.version)'
- script: python -m pip install --upgrade pip
displayName: 'Upgrade pip'
- script: pip install -r requirements.txt
displayName: 'Install requirements'
- script: |
flake8 --max-line-length=120 *.py tests/ scripts/
displayName: 'Run lint (flake8) tests'
- script: |
pytest tests --doctest-modules --junitxml=junit/test-results.xml --cov --cov-report=xml --cov-report=html
displayName: pytest
- task: PublishTestResults@2
displayName: 'Publish Test Results **/test-results.xml'
inputs:
testResultsFiles: '**/test-results.xml'
testRunTitle: 'Python $(python.version)'
- task: PublishCodeCoverageResults@1
inputs:
codeCoverageTool: Cobertura
summaryFileLocation: '$(System.DefaultWorkingDirectory)/**/coverage.xml'
reportDirectory: '$(System.DefaultWorkingDirectory)/**/htmlcov'