From 7014f60f42365ecf793091273752e7ec9346d115 Mon Sep 17 00:00:00 2001 From: Franck Nijhof Date: Thu, 25 Nov 2021 21:51:08 +0100 Subject: [PATCH] CI: Add partial run support to pyupgrade (#60362) --- .github/workflows/ci.yaml | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 7da47d390d9..063044a5602 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -365,10 +365,17 @@ jobs: echo "Failed to restore pre-commit environment from cache" exit 1 - - name: Run pyupgrade + - name: Run pyupgrade (fully) + if: needs.changes.outputs.test_full_suite == 'true' run: | . venv/bin/activate 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 run: |