CI: Add partial run support to pyupgrade (#60362)

This commit is contained in:
Franck Nijhof 2021-11-25 21:51:08 +01:00 committed by GitHub
parent 9b4fb44fea
commit 7014f60f42
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -365,10 +365,17 @@ jobs:
echo "Failed to restore pre-commit environment from cache" echo "Failed to restore pre-commit environment from cache"
exit 1 exit 1
- name: Run pyupgrade - name: Run pyupgrade (fully)
if: needs.changes.outputs.test_full_suite == 'true'
run: | run: |
. venv/bin/activate . venv/bin/activate
pre-commit run --hook-stage manual pyupgrade --all-files --show-diff-on-failure pre-commit run --hook-stage manual pyupgrade --all-files --show-diff-on-failure
- name: Run pyupgrade (partially)
if: needs.changes.outputs.test_full_suite == 'false'
shell: bash
run: |
. venv/bin/activate
pre-commit run --hook-stage manual pyupgrade --files {homeassistant,tests}/components/${{ needs.changes.outputs.integrations_glob }}/* --show-diff-on-failure
- name: Register yamllint problem matcher - name: Register yamllint problem matcher
run: | run: |