-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathazure-pipelines.yml
44 lines (36 loc) · 917 Bytes
/
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
trigger:
- main
pool:
vmImage: 'ubuntu-latest'
variables:
pythonVersion: '3.9'
steps:
- task: UsePythonVersion@0
inputs:
versionSpec: '$(pythonVersion)'
addToPath: true
- script: |
python -m venv venv
source venv/bin/activate
python -m pip install --upgrade pip
pip install -r requirements.txt
displayName: 'Install dependencies'
- script: |
source venv/bin/activate
python -m pytest tests/
displayName: 'Run tests'
- task: PublishTestResults@2
inputs:
testResultsFiles: '**/TEST-*.xml'
mergeTestResults: true
testRunTitle: 'Python Tests'
- task: CopyFiles@2
inputs:
contents: '**'
targetFolder: '$(Build.ArtifactStagingDirectory)'
displayName: 'Copy files to staging directory'
- task: PublishBuildArtifacts@1
inputs:
pathToPublish: '$(Build.ArtifactStagingDirectory)'
artifactName: 'drop'
displayName: 'Publish build artifacts'