mirror of
https://github.com/home-assistant/core.git
synced 2025-07-23 21:27:38 +00:00
Add option to run only pylint or mypy tests [ci] (#86260)
This commit is contained in:
parent
585c4acfee
commit
c8b9260f92
30
.github/workflows/ci.yaml
vendored
30
.github/workflows/ci.yaml
vendored
@ -18,6 +18,14 @@ on:
|
|||||||
description: "Skip pytest"
|
description: "Skip pytest"
|
||||||
default: false
|
default: false
|
||||||
type: boolean
|
type: boolean
|
||||||
|
pylint-only:
|
||||||
|
description: "Only run pylint"
|
||||||
|
default: false
|
||||||
|
type: boolean
|
||||||
|
mypy-only:
|
||||||
|
description: "Only run mypy"
|
||||||
|
default: false
|
||||||
|
type: boolean
|
||||||
|
|
||||||
env:
|
env:
|
||||||
CACHE_VERSION: 3
|
CACHE_VERSION: 3
|
||||||
@ -163,6 +171,9 @@ jobs:
|
|||||||
pre-commit:
|
pre-commit:
|
||||||
name: Prepare pre-commit base
|
name: Prepare pre-commit base
|
||||||
runs-on: ubuntu-20.04
|
runs-on: ubuntu-20.04
|
||||||
|
if: |
|
||||||
|
github.event.inputs.pylint-only != 'true'
|
||||||
|
&& github.event.inputs.mypy-only != 'true'
|
||||||
needs:
|
needs:
|
||||||
- info
|
- info
|
||||||
steps:
|
steps:
|
||||||
@ -554,6 +565,9 @@ jobs:
|
|||||||
hassfest:
|
hassfest:
|
||||||
name: Check hassfest
|
name: Check hassfest
|
||||||
runs-on: ubuntu-20.04
|
runs-on: ubuntu-20.04
|
||||||
|
if: |
|
||||||
|
github.event.inputs.pylint-only != 'true'
|
||||||
|
&& github.event.inputs.mypy-only != 'true'
|
||||||
needs:
|
needs:
|
||||||
- info
|
- info
|
||||||
- base
|
- base
|
||||||
@ -587,6 +601,9 @@ jobs:
|
|||||||
gen-requirements-all:
|
gen-requirements-all:
|
||||||
name: Check all requirements
|
name: Check all requirements
|
||||||
runs-on: ubuntu-20.04
|
runs-on: ubuntu-20.04
|
||||||
|
if: |
|
||||||
|
github.event.inputs.pylint-only != 'true'
|
||||||
|
&& github.event.inputs.mypy-only != 'true'
|
||||||
needs:
|
needs:
|
||||||
- info
|
- info
|
||||||
- base
|
- base
|
||||||
@ -621,6 +638,9 @@ jobs:
|
|||||||
name: Check pylint
|
name: Check pylint
|
||||||
runs-on: ubuntu-20.04
|
runs-on: ubuntu-20.04
|
||||||
timeout-minutes: 20
|
timeout-minutes: 20
|
||||||
|
if: |
|
||||||
|
github.event.inputs.mypy-only != 'true'
|
||||||
|
|| github.event.inputs.pylint-only == 'true'
|
||||||
needs:
|
needs:
|
||||||
- info
|
- info
|
||||||
- base
|
- base
|
||||||
@ -666,6 +686,9 @@ jobs:
|
|||||||
mypy:
|
mypy:
|
||||||
name: Check mypy
|
name: Check mypy
|
||||||
runs-on: ubuntu-20.04
|
runs-on: ubuntu-20.04
|
||||||
|
if: |
|
||||||
|
github.event.inputs.pylint-only != 'true'
|
||||||
|
|| github.event.inputs.mypy-only == 'true'
|
||||||
needs:
|
needs:
|
||||||
- info
|
- info
|
||||||
- base
|
- base
|
||||||
@ -710,6 +733,9 @@ jobs:
|
|||||||
|
|
||||||
pip-check:
|
pip-check:
|
||||||
runs-on: ubuntu-20.04
|
runs-on: ubuntu-20.04
|
||||||
|
if: |
|
||||||
|
github.event.inputs.pylint-only != 'true'
|
||||||
|
&& github.event.inputs.mypy-only != 'true'
|
||||||
needs:
|
needs:
|
||||||
- info
|
- info
|
||||||
- base
|
- base
|
||||||
@ -750,6 +776,8 @@ jobs:
|
|||||||
if: |
|
if: |
|
||||||
(github.event_name != 'push' || github.event.repository.full_name == 'home-assistant/core')
|
(github.event_name != 'push' || github.event.repository.full_name == 'home-assistant/core')
|
||||||
&& github.event.inputs.lint-only != 'true'
|
&& github.event.inputs.lint-only != 'true'
|
||||||
|
&& github.event.inputs.pylint-only != 'true'
|
||||||
|
&& github.event.inputs.mypy-only != 'true'
|
||||||
&& (needs.info.outputs.test_full_suite == 'true' || needs.info.outputs.tests_glob)
|
&& (needs.info.outputs.test_full_suite == 'true' || needs.info.outputs.tests_glob)
|
||||||
needs:
|
needs:
|
||||||
- info
|
- info
|
||||||
@ -873,6 +901,8 @@ jobs:
|
|||||||
if: |
|
if: |
|
||||||
(github.event_name != 'push' || github.event.repository.full_name == 'home-assistant/core')
|
(github.event_name != 'push' || github.event.repository.full_name == 'home-assistant/core')
|
||||||
&& github.event.inputs.lint-only != 'true'
|
&& github.event.inputs.lint-only != 'true'
|
||||||
|
&& github.event.inputs.pylint-only != 'true'
|
||||||
|
&& github.event.inputs.mypy-only != 'true'
|
||||||
&& needs.info.outputs.test_full_suite == 'true'
|
&& needs.info.outputs.test_full_suite == 'true'
|
||||||
needs:
|
needs:
|
||||||
- info
|
- info
|
||||||
|
Loading…
x
Reference in New Issue
Block a user