Skip to content

Commit 466d660

Browse files
Set up CI with Azure Pipelines
[skip ci]
1 parent 0e4d14e commit 466d660

File tree

1 file changed

+46
-0
lines changed

1 file changed

+46
-0
lines changed

azure-pipelines.yml

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
trigger:
2+
- main
3+
4+
pool:
5+
vmImage: ubuntu-latest
6+
7+
strategy:
8+
matrix:
9+
Python310:
10+
python.version: '3.10'
11+
Python311:
12+
python.version: '3.11'
13+
Python312:
14+
python.version: '3.12'
15+
16+
steps:
17+
- task: UsePythonVersion@0
18+
inputs:
19+
versionSpec: '$(python.version)'
20+
displayName: 'Use Python $(python.version)'
21+
22+
- script: |
23+
python -m pip install --upgrade pip
24+
pip install -r requirements.txt
25+
displayName: 'Install dependencies'
26+
27+
- task: ArchiveFiles@2
28+
displayName: 'Archive files'
29+
inputs:
30+
rootFolderOrFile: '$(System.DefaultWorkingDirectory)'
31+
includeRootFolder: false
32+
archiveType: zip
33+
archiveFile: '$(Build.ArtifactStagingDirectory)/$(Build.BuildId)-$(python.version).zip'
34+
replaceExistingArchive: true
35+
36+
- task: PublishBuildArtifacts@1
37+
displayName: 'Publish artifacts'
38+
inputs:
39+
PathtoPublish: '$(Build.ArtifactStagingDirectory)'
40+
ArtifactName: 'drop'
41+
publishLocation: 'Container'
42+
43+
- script: |
44+
pip install pytest pytest-azurepipelines
45+
pytest
46+
displayName: 'Run pytest'

0 commit comments

Comments
 (0)