Update azure-pipelines-ci.yml for Azure Pipelines
parent
d648eb1e4f
commit
896eaba2d6
|
@ -5,17 +5,42 @@ trigger:
|
|||
branches:
|
||||
include:
|
||||
- dev
|
||||
pr: none
|
||||
pr: none
|
||||
|
||||
resources:
|
||||
containers:
|
||||
- container: 35
|
||||
image: python:3.5
|
||||
- container: 36
|
||||
image: python:3.6
|
||||
- container: 37
|
||||
image: python:3.7
|
||||
|
||||
|
||||
variables:
|
||||
- name: ArtifactFeed
|
||||
value: '2df3ae11-3bf6-49bc-a809-ba0d340d6a6d'
|
||||
- name: PythonMain
|
||||
value: '35'
|
||||
|
||||
|
||||
jobs:
|
||||
|
||||
- job: 'Lint'
|
||||
pool:
|
||||
vmImage: 'ubuntu-latest'
|
||||
container: $[ variables['PythonMain'] ]
|
||||
steps:
|
||||
- script: |
|
||||
pip install flake8
|
||||
flake8 homeassistant tests script
|
||||
displayName: 'Run flake8'
|
||||
|
||||
|
||||
- job: 'Check'
|
||||
dependsOn:
|
||||
- Lint
|
||||
condition: succeeded()
|
||||
pool:
|
||||
vmImage: 'ubuntu-latest'
|
||||
strategy:
|
||||
|
@ -23,18 +48,18 @@ jobs:
|
|||
matrix:
|
||||
Python35:
|
||||
python.version: '3.5'
|
||||
python.container: 'python:3.5'
|
||||
python.container: '35'
|
||||
Python36:
|
||||
python.version: '3.6'
|
||||
python.container: 'python:3.6'
|
||||
python.container: '36'
|
||||
Python37:
|
||||
python.version: '3.7'
|
||||
python.container: 'python:3.7'
|
||||
python.container: '37'
|
||||
container: $[ variables['python.container'] ]
|
||||
steps:
|
||||
- script: |
|
||||
sudo apt-get update
|
||||
sudo apt-get install -y --no-install-recommends \
|
||||
apt-get update
|
||||
apt-get install -y --no-install-recommends \
|
||||
libudev libavformat libavcodec libavdevice libavutil libswscale libswresample libavfilter
|
||||
|
||||
echo "$(python.version)" > .cache
|
||||
|
@ -49,7 +74,7 @@ jobs:
|
|||
|
||||
- script: |
|
||||
# Install build env
|
||||
sudo apt-get install -y --no-install-recommends \
|
||||
apt-get install -y --no-install-recommends \
|
||||
libudev-dev libavformat-dev libavcodec-dev libavdevice-dev libavutil-dev libswscale-dev libswresample-dev libavfilter-dev
|
||||
|
||||
# Setup venv
|
||||
|
@ -57,7 +82,7 @@ jobs:
|
|||
|
||||
. venv/bin/activate
|
||||
pip install -U pip setuptools
|
||||
pip3 install -r requirements_test_all.txt -c homeassistant/package_constraints.txt
|
||||
pip install -r requirements_test_all.txt -c homeassistant/package_constraints.txt
|
||||
displayName: 'Create Virtual Environment & Install Requirements'
|
||||
condition: ne(variables['CacheRestored'], 'true')
|
||||
|
||||
|
@ -77,3 +102,11 @@ jobs:
|
|||
. venv/bin/activate
|
||||
pytest --timeout=9 --durations=10 -qq -o console_output_style=count -p no:sugar tests
|
||||
displayName: 'Run pytest for python $(python.version)'
|
||||
|
||||
- script: |
|
||||
. venv/bin/activate
|
||||
pip install -r requirements_all.txt -c homeassistant/package_constraints.txt
|
||||
|
||||
pylint homeassistant
|
||||
displayName: 'Run pylint'
|
||||
condition: eq($(python.container), $(PythonMain))
|
||||
|
|
Loading…
Reference in New Issue