-
Notifications
You must be signed in to change notification settings - Fork 1
/
.pr-pipeline.yml
77 lines (68 loc) · 1.92 KB
/
.pr-pipeline.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
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
# 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: none
pr:
- master
- dev
stages:
- stage: Check
jobs:
- job: Tests
pool:
vmImage: 'ubuntu-latest'
strategy:
matrix:
Python310:
python.version: '3.10'
Python311:
python.version: '3.11'
steps:
- template: .use-python.yml
- script: pytest tests
displayName: 'Test'
- job: Typings
pool:
vmImage: 'ubuntu-latest'
strategy:
matrix:
Python310:
python.version: '3.10'
steps:
- template: .use-python.yml
- script: mypy serious
displayName: 'Check typings'
- job: Version
pool:
vmImage: 'ubuntu-latest'
strategy:
matrix:
Python310:
python.version: '3.10'
steps:
- template: .use-python.yml
- script: cv serious
displayName: 'Check version changed'
- stage: Report
jobs:
- job: TestCoverage
pool:
vmImage: 'ubuntu-latest'
strategy:
matrix:
Python310:
python.version: '3.10'
steps:
- template: .use-python.yml
- script: git checkout $(System.PullRequest.SourceBranch)
displayName: 'Checkout branch'
- script: pytest tests --cov=serious --cov-report=html
displayName: 'Test with coverage'
- script: coveralls
displayName: 'Save code coverage'
env:
COVERALLS_REPO_TOKEN: $(COVERALLS_REPO_TOKEN)
dependsOn:
- Check
condition: succeeded('Check')