From cd80cd5caafbfb45b4ddc03bdfcc2f4fad732eb4 Mon Sep 17 00:00:00 2001 From: Marc Mueller <30130371+cdce8p@users.noreply.github.com> Date: Thu, 1 Aug 2024 11:30:29 +0200 Subject: [PATCH] Update audit licenses run conditions [ci] (#123009) --- .core_files.yaml | 1 + .github/workflows/ci.yaml | 24 ++++++++++++++++++++++-- 2 files changed, 23 insertions(+), 2 deletions(-) diff --git a/.core_files.yaml b/.core_files.yaml index 08cabb71164429..3f92ed87a84f04 100644 --- a/.core_files.yaml +++ b/.core_files.yaml @@ -146,6 +146,7 @@ requirements: &requirements - homeassistant/package_constraints.txt - requirements*.txt - pyproject.toml + - script/licenses.py any: - *base_platforms diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 96ba319fdb9230..23a8b10c0d349b 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -31,6 +31,10 @@ on: description: "Only run mypy" default: false type: boolean + audit-licenses-only: + description: "Only run audit licenses" + default: false + type: boolean env: CACHE_VERSION: 9 @@ -222,6 +226,7 @@ jobs: if: | github.event.inputs.pylint-only != 'true' && github.event.inputs.mypy-only != 'true' + && github.event.inputs.audit-licenses-only != 'true' needs: - info steps: @@ -343,6 +348,7 @@ jobs: pre-commit run --hook-stage manual ruff --all-files --show-diff-on-failure env: RUFF_OUTPUT_FORMAT: github + lint-other: name: Check other linters runs-on: ubuntu-24.04 @@ -518,6 +524,7 @@ jobs: if: | github.event.inputs.pylint-only != 'true' && github.event.inputs.mypy-only != 'true' + && github.event.inputs.audit-licenses-only != 'true' needs: - info - base @@ -556,6 +563,7 @@ jobs: if: | github.event.inputs.pylint-only != 'true' && github.event.inputs.mypy-only != 'true' + && github.event.inputs.audit-licenses-only != 'true' needs: - info - base @@ -589,7 +597,10 @@ jobs: - info - base if: | - needs.info.outputs.requirements == 'true' + (github.event.inputs.pylint-only != 'true' + && github.event.inputs.mypy-only != 'true' + || github.event.inputs.audit-licenses-only == 'true') + && needs.info.outputs.requirements == 'true' steps: - name: Check out code from GitHub uses: actions/checkout@v4.1.7 @@ -628,6 +639,7 @@ jobs: timeout-minutes: 20 if: | github.event.inputs.mypy-only != 'true' + && github.event.inputs.audit-licenses-only != 'true' || github.event.inputs.pylint-only == 'true' needs: - info @@ -672,7 +684,9 @@ jobs: runs-on: ubuntu-24.04 timeout-minutes: 20 if: | - (github.event.inputs.mypy-only != 'true' || github.event.inputs.pylint-only == 'true') + (github.event.inputs.mypy-only != 'true' + && github.event.inputs.audit-licenses-only != 'true' + || github.event.inputs.pylint-only == 'true') && (needs.info.outputs.tests_glob || needs.info.outputs.test_full_suite == 'true') needs: - info @@ -717,6 +731,7 @@ jobs: runs-on: ubuntu-24.04 if: | github.event.inputs.pylint-only != 'true' + && github.event.inputs.audit-licenses-only != 'true' || github.event.inputs.mypy-only == 'true' needs: - info @@ -781,6 +796,7 @@ jobs: && github.event.inputs.lint-only != 'true' && github.event.inputs.pylint-only != 'true' && github.event.inputs.mypy-only != 'true' + && github.event.inputs.audit-licenses-only != 'true' && needs.info.outputs.test_full_suite == 'true' needs: - info @@ -831,6 +847,7 @@ jobs: && github.event.inputs.lint-only != 'true' && github.event.inputs.pylint-only != 'true' && github.event.inputs.mypy-only != 'true' + && github.event.inputs.audit-licenses-only != 'true' && needs.info.outputs.test_full_suite == 'true' needs: - info @@ -951,6 +968,7 @@ jobs: && github.event.inputs.lint-only != 'true' && github.event.inputs.pylint-only != 'true' && github.event.inputs.mypy-only != 'true' + && github.event.inputs.audit-licenses-only != 'true' && needs.info.outputs.mariadb_groups != '[]' needs: - info @@ -1076,6 +1094,7 @@ jobs: && github.event.inputs.lint-only != 'true' && github.event.inputs.pylint-only != 'true' && github.event.inputs.mypy-only != 'true' + && github.event.inputs.audit-licenses-only != 'true' && needs.info.outputs.postgresql_groups != '[]' needs: - info @@ -1220,6 +1239,7 @@ jobs: && github.event.inputs.lint-only != 'true' && github.event.inputs.pylint-only != 'true' && github.event.inputs.mypy-only != 'true' + && github.event.inputs.audit-licenses-only != 'true' && needs.info.outputs.tests_glob && needs.info.outputs.test_full_suite == 'false' needs: