mirror of
https://github.com/home-assistant/core.git
synced 2025-07-23 13:17:32 +00:00
Update azure-pipelines-ci.yml for Azure Pipelines
This commit is contained in:
parent
3c7be11c31
commit
230ca9b89d
@ -34,12 +34,27 @@ stages:
|
||||
vmImage: 'ubuntu-latest'
|
||||
container: $[ variables['PythonMain'] ]
|
||||
steps:
|
||||
- task: CacheBeta@0
|
||||
inputs:
|
||||
key: |
|
||||
$(Build.SourcesDirectory)/requirements_test.txt
|
||||
$(PythonMain)
|
||||
path: $(Pipeline.Workspace)/venv.tar.gz
|
||||
cacheHitVar: CacheRestored
|
||||
- script: |
|
||||
set -e
|
||||
python -m venv venv
|
||||
|
||||
. venv/bin/activate
|
||||
pip install -r requirements_test.txt
|
||||
displayName: 'Setup Env'
|
||||
|
||||
tar -czf $(Pipeline.Workspace)/venv.tar.gz venv
|
||||
displayName: 'Create Virtual Environment & Install Requirements'
|
||||
condition: and(succeeded(), ne(variables['CacheRestored'], 'true'))
|
||||
- script: |
|
||||
tar -xzf $(Pipeline.Workspace)/venv.tar.gz
|
||||
displayName: 'Restore Virtual Environment'
|
||||
condition: and(succeeded(), eq(variables['CacheRestored'], 'true'))
|
||||
- script: |
|
||||
. venv/bin/activate
|
||||
flake8 homeassistant tests script
|
||||
@ -92,7 +107,7 @@ stages:
|
||||
- script: |
|
||||
set -e
|
||||
python -m venv venv
|
||||
|
||||
|
||||
. venv/bin/activate
|
||||
pip install -U pip setuptools
|
||||
pip install -r requirements_test_all.txt -c homeassistant/package_constraints.txt
|
||||
|
Loading…
x
Reference in New Issue
Block a user