This repository was archived by the owner on Dec 21, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathazure-pipelines.yml
More file actions
58 lines (48 loc) · 1.46 KB
/
Copy pathazure-pipelines.yml
File metadata and controls
58 lines (48 loc) · 1.46 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
# Python package
# Create and test a Python package on multiple Python versions.
# Add steps that analyze code, save the dist with the build record, publish to a PyPI-compatible index, and more:
# https://docs.microsoft.com/azure/devops/pipelines/languages/python
trigger:
- master
jobs:
- job: 'Test'
# https://docs.microsoft.com/azure/devops/pipelines/languages/python
pool:
vmImage: 'ubuntu-16.04' # other options: 'macOS-10.13', 'vs2017-win2016'
steps:
- task: UsePythonVersion@0
inputs:
versionSpec: '3.7'
architecture: 'x64'
- script: |
python -m setup.py install
pip install -r requirements.txt
pip install pylint
pip install haikunator
pylint *.py
pylint azuresearch/*.py
pylint azuresearch/analyzers/*.py
pylint azuresearch/indexes/*.py
pylint azuresearch/skills/*.py
displayName: 'pylint'
continueOnError: true
- script: |
pip install pytest
pytest -v -m "not integration" --doctest-modules --junitxml=junit/test-results.xml
displayName: 'pytest'
- task: PublishTestResults@2
inputs:
testResultsFiles: '**/test-results.xml'
testRunTitle: 'Python $(python.version)'
condition: succeededOrFailed()
- job: 'Publish'
dependsOn: 'Test'
pool:
vmImage: 'Ubuntu-16.04'
steps:
- task: UsePythonVersion@0
inputs:
versionSpec: '3.x'
architecture: 'x64'
- script: python setup.py sdist
displayName: 'Build sdist'