From 3664f61e2dd0dd6bf1e9fae67b5bc7fd9f47411e Mon Sep 17 00:00:00 2001 From: Pascal Vizeli Date: Fri, 7 Jun 2019 22:24:43 +0200 Subject: [PATCH] Update azure-pipelines-ci.yml for Azure Pipelines --- azure-pipelines-ci.yml | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/azure-pipelines-ci.yml b/azure-pipelines-ci.yml index 7377c8092df..51573610538 100644 --- a/azure-pipelines-ci.yml +++ b/azure-pipelines-ci.yml @@ -38,13 +38,13 @@ jobs: sudo apt-get install -y --no-install-recommends \ libudev libavformat libavcodec libavdevice libavutil libswscale libswresample libavfilter - echo "$(python.version)" > .python + echo "$(python.version)" > .cache displayName: 'Set up docker prerequisite requirement' - task: 1ESLighthouseEng.PipelineArtifactCaching.RestoreCacheV1.RestoreCache@1 displayName: 'Restore artifacts based on Requirements' inputs: - keyfile: 'requirements_test_all.txt, .python' + keyfile: 'requirements_test_all.txt, .cache' targetfolder: './venv' vstsFeed: '$(ArtifactFeed)' @@ -55,6 +55,7 @@ jobs: # Setup venv python3 -m venv venv + . venv/bin/activate pip install -U pip setuptools pip3 install -r requirements_test_all.txt -c homeassistant/package_constraints.txt @@ -64,11 +65,13 @@ jobs: - task: 1ESLighthouseEng.PipelineArtifactCaching.SaveCacheV1.SaveCache@1 displayName: 'Save artifacts based on Requirements' inputs: - keyfile: 'requirements_test_all.txt, .python' + keyfile: 'requirements_test_all.txt, .cache' targetfolder: './venv' vstsFeed: '$(ArtifactFeed)' - script: | - ./venv/bin/py.test --timeout=9 --durations=10 -qq -o console_output_style=count -p no:sugar + + . venv/bin/activate + pytest --timeout=9 --durations=10 -qq -o console_output_style=count -p no:sugar ./script/check_dirty - displayName: 'Run py.test with python $(python.version)' + displayName: 'Run pytest for python $(python.version)'