forked from rytilahti/python-miio
-
Notifications
You must be signed in to change notification settings - Fork 0
/
azure-pipelines.yml
109 lines (87 loc) · 2.44 KB
/
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
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
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
trigger:
- master
pr:
- master
stages:
- stage: "Linting"
jobs:
- job: "LintChecks"
pool:
vmImage: "ubuntu-latest"
strategy:
matrix:
Python 3.8:
python.version: '3.8'
steps:
- task: UsePythonVersion@0
inputs:
versionSpec: '$(python.version)'
displayName: 'Use Python $(python.version)'
- script: |
python -m pip install --upgrade pip poetry
poetry install --extras docs
displayName: 'Install dependencies'
- script: |
poetry run pre-commit run black --all-files
displayName: 'Code formating (black)'
- script: |
poetry run pre-commit run flake8 --all-files
displayName: 'Code formating (flake8)'
#- script: |
# pre-commit run mypy --all-files
# displayName: 'Typing checks (mypy)'
- script: |
poetry run pre-commit run isort --all-files
displayName: 'Order of imports (isort)'
- script: |
poetry run sphinx-build docs/ generated_docs
displayName: 'Documentation build (sphinx)'
- stage: "Tests"
jobs:
- job: "Tests"
strategy:
matrix:
Python 3.6 Ubuntu:
python.version: '3.6'
vmImage: 'ubuntu-latest'
Python 3.7 Ubuntu:
python.version: '3.7'
vmImage: 'ubuntu-latest'
Python 3.8 Ubuntu:
python.version: '3.8'
vmImage: 'ubuntu-latest'
PyPy Ubuntu:
python.version: pypy3
vmImage: 'ubuntu-latest'
Python 3.6 Windows:
python.version: '3.6'
vmImage: 'windows-latest'
Python 3.7 Windows:
python.version: '3.7'
vmImage: 'windows-latest'
Python 3.8 Windows:
python.version: '3.8'
vmImage: 'windows-latest'
Python 3.6 OSX:
python.version: '3.6'
vmImage: 'macOS-latest'
Python 3.7 OSX:
python.version: '3.7'
vmImage: 'macOS-latest'
Python 3.8 OSX:
python.version: '3.8'
vmImage: 'macOS-latest'
pool:
vmImage: $(vmImage)
steps:
- task: UsePythonVersion@0
inputs:
versionSpec: '$(python.version)'
displayName: 'Use Python $(python.version)'
- script: |
python -m pip install --upgrade pip poetry
poetry install
displayName: 'Install dependencies'
- script: |
poetry run pytest --cov miio --cov-report html
displayName: 'Tests'