2019-11-11 21:14:34 +00:00
|
|
|
trigger:
|
|
|
|
- master
|
|
|
|
pr:
|
|
|
|
- master
|
|
|
|
|
|
|
|
strategy:
|
|
|
|
matrix:
|
2020-03-17 23:40:06 +00:00
|
|
|
Python 3.7 Ubuntu:
|
|
|
|
python.version: '3.7'
|
|
|
|
vmImage: 'ubuntu-latest'
|
2020-03-18 11:50:42 +00:00
|
|
|
Python 3.8 Ubuntu:
|
|
|
|
python.version: '3.8'
|
|
|
|
vmImage: 'ubuntu-latest'
|
2020-03-17 23:40:06 +00:00
|
|
|
# PyPy Ubuntu:
|
|
|
|
# python.version: pypy3
|
|
|
|
# vmImage: 'ubuntu-latest'
|
|
|
|
Python 3.7 Windows:
|
|
|
|
python.version: '3.7'
|
|
|
|
vmImage: 'windows-latest'
|
2020-03-18 11:50:42 +00:00
|
|
|
Python 3.8 Windows:
|
|
|
|
python.version: '3.8'
|
|
|
|
vmImage: 'windows-latest'
|
2020-03-17 23:40:06 +00:00
|
|
|
Python 3.7 OSX:
|
2019-11-11 21:14:34 +00:00
|
|
|
python.version: '3.7'
|
2020-03-17 23:40:06 +00:00
|
|
|
vmImage: 'macOS-latest'
|
2020-03-18 11:50:42 +00:00
|
|
|
Python 3.8 OSX:
|
|
|
|
python.version: '3.8'
|
|
|
|
vmImage: 'macOS-latest'
|
2020-03-17 23:40:06 +00:00
|
|
|
|
|
|
|
pool:
|
|
|
|
vmImage: $(vmImage)
|
2019-11-11 21:14:34 +00:00
|
|
|
|
|
|
|
steps:
|
|
|
|
- task: UsePythonVersion@0
|
|
|
|
inputs:
|
|
|
|
versionSpec: '$(python.version)'
|
|
|
|
displayName: 'Use Python $(python.version)'
|
|
|
|
|
|
|
|
- script: |
|
|
|
|
python -m pip install --upgrade pip
|
|
|
|
pip install -r requirements.txt
|
2020-01-14 17:58:39 +00:00
|
|
|
pip install -r requirements_test.txt
|
2019-11-11 21:14:34 +00:00
|
|
|
displayName: 'Install dependencies'
|
|
|
|
|
|
|
|
- script: |
|
|
|
|
pre-commit run black --all-files
|
|
|
|
displayName: 'Code formating (black)'
|
|
|
|
|
|
|
|
- script: |
|
|
|
|
pre-commit run flake8 --all-files
|
|
|
|
displayName: 'Code formating (flake8)'
|
|
|
|
|
|
|
|
- script: |
|
|
|
|
pre-commit run mypy --all-files
|
|
|
|
displayName: 'Typing checks (mypy)'
|
|
|
|
|
|
|
|
- script: |
|
|
|
|
pre-commit run isort --all-files
|
|
|
|
displayName: 'Order of imports (isort)'
|
|
|
|
|
2019-12-12 09:41:36 +00:00
|
|
|
- script: |
|
|
|
|
pre-commit run trailing-whitespace --all-files
|
|
|
|
displayName: 'Run trailing-whitespace'
|
|
|
|
|
|
|
|
- script: |
|
|
|
|
pre-commit run end-of-file-fixer --all-files
|
|
|
|
displayName: 'Run end-of-file-fixer'
|
|
|
|
|
|
|
|
- script: |
|
|
|
|
pre-commit run check-docstring-first --all-files
|
|
|
|
displayName: 'Run check-docstring-first'
|
|
|
|
|
|
|
|
- script: |
|
|
|
|
pre-commit run check-yaml --all-files
|
|
|
|
displayName: 'Run check-yaml'
|
|
|
|
|
|
|
|
- script: |
|
|
|
|
pre-commit run debug-statements --all-files
|
|
|
|
displayName: 'Run debug-statements'
|
|
|
|
|
|
|
|
- script: |
|
|
|
|
pre-commit run check-ast --all-files
|
|
|
|
displayName: 'Run check-ast'
|
|
|
|
|
|
|
|
- script: |
|
|
|
|
pre-commit run isort --all-files
|
|
|
|
displayName: 'Order of imports (isort)'
|
|
|
|
|
2019-11-11 21:14:34 +00:00
|
|
|
- script: |
|
2019-12-18 08:11:18 +00:00
|
|
|
pytest --cov kasa --cov-report html
|
2019-11-11 21:14:34 +00:00
|
|
|
displayName: 'Tests'
|