File tree 1 file changed +71
-0
lines changed
1 file changed +71
-0
lines changed Original file line number Diff line number Diff line change
1
+ # Create the project in Azure with:
2
+ # az devops project create --name $name --organization https://dev.azure.com/$org/ --visibility public
3
+ # then configure the pipelines (through web UI)
4
+
5
+ trigger :
6
+ branches :
7
+ include :
8
+ - ' *'
9
+ tags :
10
+ include :
11
+ - ' *'
12
+
13
+ pool :
14
+ vmimage : ' Ubuntu-18.04'
15
+
16
+ variables :
17
+ - group : Azure secrets
18
+
19
+ stages :
20
+ - stage : Test
21
+ jobs :
22
+
23
+ - job : ' Test'
24
+ strategy :
25
+ matrix :
26
+ Python36 :
27
+ python.version : ' 3.6'
28
+ Python38 :
29
+ python.version : ' 3.8'
30
+ maxParallel : 4
31
+
32
+ steps :
33
+ - task : UsePythonVersion@0
34
+ inputs :
35
+ versionSpec : ' $(python.version)'
36
+ architecture : ' x64'
37
+
38
+ - script : python -m pip install tox
39
+ displayName : ' Install tox'
40
+
41
+ - script : |
42
+ tox -- --junit-xml=test-results.xml
43
+ displayName: 'run tests'
44
+
45
+ - task : PublishTestResults@2
46
+ inputs :
47
+ testResultsFiles : ' **/test-results.xml'
48
+ testRunTitle : ' Python $(python.version)'
49
+ condition : succeededOrFailed()
50
+
51
+ - stage : Publish
52
+ dependsOn : Test
53
+ jobs :
54
+ - job : ' Publish'
55
+
56
+ steps :
57
+ - task : UsePythonVersion@0
58
+ inputs :
59
+ versionSpec : ' 3.8'
60
+ architecture : ' x64'
61
+
62
+ - script : python -m pip install tox
63
+ displayName : ' Install tox'
64
+
65
+ - script : |
66
+ tox -e release
67
+ env:
68
+ TWINE_PASSWORD: $(PyPI-token)
69
+ displayName: 'publish to PyPI'
70
+
71
+ condition : contains(variables['Build.SourceBranch'], 'tags')
You can’t perform that action at this time.
0 commit comments