From 0a5966c283af6bbf82a12441ab53766b55fe7b10 Mon Sep 17 00:00:00 2001 From: Pascal Vizeli Date: Sun, 9 Jun 2019 15:32:30 +0200 Subject: [PATCH] Update azure-pipelines-ci.yml for Azure Pipelines --- azure-pipelines-ci.yml | 43 ++++++++++++++++++++++++++++++++++++++++-- 1 file changed, 41 insertions(+), 2 deletions(-) diff --git a/azure-pipelines-ci.yml b/azure-pipelines-ci.yml index 8b0b4e50fa1..d09ce33ca31 100644 --- a/azure-pipelines-ci.yml +++ b/azure-pipelines-ci.yml @@ -43,7 +43,6 @@ jobs: - job: 'Check' dependsOn: - Lint - condition: succeeded() pool: vmImage: 'ubuntu-latest' strategy: @@ -98,10 +97,50 @@ jobs: pytest --timeout=9 --durations=10 -qq -o console_output_style=count -p no:sugar tests displayName: 'Run pytest for python $(python.version)' + +- job: 'FullCheck' + dependsOn: + - Check + pool: + vmImage: 'ubuntu-latest' + container: $[ variables['PythonMain'] ] + steps: + - script: | + echo "$(PythonMain)" > .cache + displayName: 'Set python $(python.version) for requirement cache' + - task: 1ESLighthouseEng.PipelineArtifactCaching.RestoreCacheV1.RestoreCache@1 + displayName: 'Restore artifacts based on Requirements' + inputs: + keyfile: 'requirements_all.txt, .cache' + targetfolder: './venv' + vstsFeed: '$(ArtifactFeed)' + + - script: | + set -e + python -m venv venv + + . venv/bin/activate + pip install -U pip setuptools + pip install -r requirements_all.txt -c homeassistant/package_constraints.txt + displayName: 'Create Virtual Environment & Install Requirements' + condition: and(succeeded(), ne(variables['CacheRestored'], 'true')) + + - task: 1ESLighthouseEng.PipelineArtifactCaching.SaveCacheV1.SaveCache@1 + displayName: 'Save artifacts based on Requirements' + inputs: + keyfile: 'requirements_all.txt, .cache' + targetfolder: './venv' + vstsFeed: '$(ArtifactFeed)' + + - script: | + . venv/bin/activate + pip install -e . + displayName: 'Install Home Assistant 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: and(succeeded(), eq(variables['python.container'], variables['PythonMain'])) \ No newline at end of file +