mirror of
https://github.com/home-assistant/core.git
synced 2025-08-03 18:48:22 +00:00
Update azure-pipelines-ci.yml for Azure Pipelines
This commit is contained in:
parent
d648eb1e4f
commit
896eaba2d6
@ -7,15 +7,40 @@ trigger:
|
|||||||
- dev
|
- 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:
|
variables:
|
||||||
- name: ArtifactFeed
|
- name: ArtifactFeed
|
||||||
value: '2df3ae11-3bf6-49bc-a809-ba0d340d6a6d'
|
value: '2df3ae11-3bf6-49bc-a809-ba0d340d6a6d'
|
||||||
|
- name: PythonMain
|
||||||
|
value: '35'
|
||||||
|
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
|
|
||||||
|
- job: 'Lint'
|
||||||
|
pool:
|
||||||
|
vmImage: 'ubuntu-latest'
|
||||||
|
container: $[ variables['PythonMain'] ]
|
||||||
|
steps:
|
||||||
|
- script: |
|
||||||
|
pip install flake8
|
||||||
|
flake8 homeassistant tests script
|
||||||
|
displayName: 'Run flake8'
|
||||||
|
|
||||||
|
|
||||||
- job: 'Check'
|
- job: 'Check'
|
||||||
|
dependsOn:
|
||||||
|
- Lint
|
||||||
|
condition: succeeded()
|
||||||
pool:
|
pool:
|
||||||
vmImage: 'ubuntu-latest'
|
vmImage: 'ubuntu-latest'
|
||||||
strategy:
|
strategy:
|
||||||
@ -23,18 +48,18 @@ jobs:
|
|||||||
matrix:
|
matrix:
|
||||||
Python35:
|
Python35:
|
||||||
python.version: '3.5'
|
python.version: '3.5'
|
||||||
python.container: 'python:3.5'
|
python.container: '35'
|
||||||
Python36:
|
Python36:
|
||||||
python.version: '3.6'
|
python.version: '3.6'
|
||||||
python.container: 'python:3.6'
|
python.container: '36'
|
||||||
Python37:
|
Python37:
|
||||||
python.version: '3.7'
|
python.version: '3.7'
|
||||||
python.container: 'python:3.7'
|
python.container: '37'
|
||||||
container: $[ variables['python.container'] ]
|
container: $[ variables['python.container'] ]
|
||||||
steps:
|
steps:
|
||||||
- script: |
|
- script: |
|
||||||
sudo apt-get update
|
apt-get update
|
||||||
sudo apt-get install -y --no-install-recommends \
|
apt-get install -y --no-install-recommends \
|
||||||
libudev libavformat libavcodec libavdevice libavutil libswscale libswresample libavfilter
|
libudev libavformat libavcodec libavdevice libavutil libswscale libswresample libavfilter
|
||||||
|
|
||||||
echo "$(python.version)" > .cache
|
echo "$(python.version)" > .cache
|
||||||
@ -49,7 +74,7 @@ jobs:
|
|||||||
|
|
||||||
- script: |
|
- script: |
|
||||||
# Install build env
|
# 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
|
libudev-dev libavformat-dev libavcodec-dev libavdevice-dev libavutil-dev libswscale-dev libswresample-dev libavfilter-dev
|
||||||
|
|
||||||
# Setup venv
|
# Setup venv
|
||||||
@ -57,7 +82,7 @@ jobs:
|
|||||||
|
|
||||||
. venv/bin/activate
|
. venv/bin/activate
|
||||||
pip install -U pip setuptools
|
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'
|
displayName: 'Create Virtual Environment & Install Requirements'
|
||||||
condition: ne(variables['CacheRestored'], 'true')
|
condition: ne(variables['CacheRestored'], 'true')
|
||||||
|
|
||||||
@ -77,3 +102,11 @@ jobs:
|
|||||||
. venv/bin/activate
|
. venv/bin/activate
|
||||||
pytest --timeout=9 --durations=10 -qq -o console_output_style=count -p no:sugar tests
|
pytest --timeout=9 --durations=10 -qq -o console_output_style=count -p no:sugar tests
|
||||||
displayName: 'Run pytest for python $(python.version)'
|
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…
x
Reference in New Issue
Block a user