Use pre-commit in CI and tox (#27743)
This commit is contained in:
committed by
Paulus Schoutsen
parent
a119932ee5
commit
103ffacea7
@@ -45,9 +45,10 @@ stages:
|
||||
|
||||
. venv/bin/activate
|
||||
pip install -r requirements_test.txt -c homeassistant/package_constraints.txt
|
||||
pre-commit install-hooks
|
||||
- script: |
|
||||
. venv/bin/activate
|
||||
flake8 homeassistant tests script
|
||||
pre-commit run flake8 --all-files
|
||||
displayName: 'Run flake8'
|
||||
- job: 'Validate'
|
||||
pool:
|
||||
@@ -83,9 +84,10 @@ stages:
|
||||
|
||||
. venv/bin/activate
|
||||
pip install -r requirements_test.txt -c homeassistant/package_constraints.txt
|
||||
pre-commit install-hooks
|
||||
- script: |
|
||||
. venv/bin/activate
|
||||
./script/check_format
|
||||
pre-commit run black --all-files
|
||||
displayName: 'Check Black formatting'
|
||||
|
||||
- stage: 'Tests'
|
||||
@@ -180,7 +182,8 @@ stages:
|
||||
|
||||
. venv/bin/activate
|
||||
pip install -e . -r requirements_test.txt -c homeassistant/package_constraints.txt
|
||||
pre-commit install-hooks
|
||||
- script: |
|
||||
. venv/bin/activate
|
||||
mypy homeassistant
|
||||
pre-commit run mypy --all-files
|
||||
displayName: 'Run mypy'
|
||||
|
||||
Reference in New Issue
Block a user