Skip to content

Commit 871e71a

Browse files
committed
Set up CI with Azure Pipelines
[skip ci]
1 parent 0e4d14e commit 871e71a

File tree

1 file changed

+100
-0
lines changed

1 file changed

+100
-0
lines changed

azure-pipelines.yml

Lines changed: 100 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,100 @@
1+
# Python package
2+
# Create and test a Python package on multiple Python versions.
3+
# Add steps that analyze code, save the dist with the build record, publish to a PyPI-compatible index, and more:
4+
# https://docs.microsoft.com/azure/devops/pipelines/languages/python
5+
6+
trigger:
7+
- main
8+
9+
pool:
10+
vmImage: ubuntu-latest
11+
12+
strategy:
13+
matrix:
14+
Python38:
15+
python.version: '3.8'
16+
Python39:
17+
python.version: '3.9'
18+
Python310:
19+
python.version: '3.10'
20+
Python311:
21+
python.version: '3.11'
22+
23+
steps:
24+
- task: UsePythonVersion@0
25+
inputs:
26+
versionSpec: '$(python.version)'
27+
displayName: 'Use Python $(python.version)'
28+
29+
- script: |
30+
python -m pip install --upgrade pip
31+
pip install -r requirements.txt
32+
displayName: 'Install dependencies'
33+
34+
- script: |
35+
pip install pytest pytest-azurepipelines
36+
pytest
37+
displayName: 'pytest'
38+
trigger:
39+
40+
- main
41+
42+
43+
44+
pool:
45+
46+
vmImage: ubuntu-latest
47+
48+
49+
50+
strategy:
51+
52+
matrix:
53+
54+
Python310:
55+
56+
python.version: '3.10'
57+
58+
Python311:
59+
60+
python.version: '3.11'
61+
62+
Python312:
63+
64+
python.version: '3.12'
65+
66+
67+
68+
steps:
69+
70+
- task: UsePythonVersion@0
71+
72+
inputs:
73+
74+
versionSpec: '$(python.version)'
75+
76+
displayName: 'Use Python $(python.version)'
77+
78+
79+
80+
- script: |
81+
82+
python -m pip install --upgrade pip
83+
84+
pip install -r requirements.txt
85+
86+
displayName: 'Install dependencies'
87+
88+
89+
90+
- task: ArchiveFiles@2
91+
92+
displayName: 'Archive files'
93+
94+
inputs:
95+
96+
rootFolderOrFile: $(System.DefaultWorkingDirectory)
97+
98+
includeRootFolder: false
99+
100+
archiveType: zip

0 commit comments

Comments
 (0)