forked from ansible/ansibullbot
-
Notifications
You must be signed in to change notification settings - Fork 0
/
azure-pipelines.yml
47 lines (44 loc) · 1.41 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
trigger:
- master
pr:
- master
pool:
vmImage: 'ubuntu-18.04'
jobs:
- job: python
displayName: Python
variables:
TOXENV: python
strategy:
matrix:
2.7:
python_version: 2.7
3.7:
python_version: 3.7
steps:
- task: UsePythonVersion@0
inputs:
versionSpec: $(python_version)
displayName: Install Python $(python_version)
- script: PATH="$HOME/.local/bin:$PATH" pip install --disable-pip-version-check --user tox
displayName: Install tox
- script: PATH="$HOME/.local/bin:$PATH" tox --notest
displayName: Run tox --notest
- script: PATH="$HOME/.local/bin:$PATH" tox
displayName: Run tox
- script: PATH="$HOME/.local/bin:$PATH" tox -e report-coverage
condition: succeededOrFailed()
displayName: Report Coverage
- task: PublishTestResults@2
condition: succeededOrFailed()
inputs:
testResultsFiles: 'shippable/testresults/pytest.xml'
pathToSources: '$(System.DefaultWorkingDirectory)'
displayName: Publish Test Results
- task: PublishCodeCoverageResults@1
condition: succeededOrFailed()
inputs:
codeCoverageTool: Cobertura
summaryFileLocation: 'shippable/codecoverage/pytest-cov.xml'
pathToSources: '$(System.DefaultWorkingDirectory)'
displayName: Publish Coverage Results