mirror of
https://github.com/esphome/esphome.git
synced 2026-05-30 07:16:11 +08:00
[ci] Run ci-custom.py as a pre-commit check (#15411)
This commit is contained in:
@@ -723,7 +723,7 @@ jobs:
|
|||||||
cache-key: ${{ needs.common.outputs.cache-key }}
|
cache-key: ${{ needs.common.outputs.cache-key }}
|
||||||
- uses: esphome/pre-commit-action@43cd1109c09c544d97196f7730ee5b2e0cc6d81e # v3.0.1 fork with pinned actions/cache
|
- uses: esphome/pre-commit-action@43cd1109c09c544d97196f7730ee5b2e0cc6d81e # v3.0.1 fork with pinned actions/cache
|
||||||
env:
|
env:
|
||||||
SKIP: pylint,clang-tidy-hash
|
SKIP: pylint,clang-tidy-hash,ci-custom
|
||||||
- uses: pre-commit-ci/lite-action@5d6cc0eb514c891a40562a58a8e71576c5c7fb43 # v1.1.0
|
- uses: pre-commit-ci/lite-action@5d6cc0eb514c891a40562a58a8e71576c5c7fb43 # v1.1.0
|
||||||
if: always()
|
if: always()
|
||||||
|
|
||||||
|
|||||||
@@ -65,3 +65,7 @@ repos:
|
|||||||
files: ^(\.clang-tidy|platformio\.ini|requirements_dev\.txt)$
|
files: ^(\.clang-tidy|platformio\.ini|requirements_dev\.txt)$
|
||||||
pass_filenames: false
|
pass_filenames: false
|
||||||
additional_dependencies: []
|
additional_dependencies: []
|
||||||
|
- id: ci-custom
|
||||||
|
name: ci-custom
|
||||||
|
entry: python3 script/run-in-env.py script/ci-custom.py
|
||||||
|
language: system
|
||||||
|
|||||||
@@ -44,7 +44,8 @@ def find_and_activate_virtualenv():
|
|||||||
def run_command():
|
def run_command():
|
||||||
# Execute the remaining arguments in the new environment
|
# Execute the remaining arguments in the new environment
|
||||||
if len(sys.argv) > 1:
|
if len(sys.argv) > 1:
|
||||||
subprocess.run(sys.argv[1:], check=False, close_fds=False)
|
result = subprocess.run(sys.argv[1:], check=False, close_fds=False)
|
||||||
|
sys.exit(result.returncode)
|
||||||
else:
|
else:
|
||||||
print(
|
print(
|
||||||
"No command provided to run in the virtual environment.",
|
"No command provided to run in the virtual environment.",
|
||||||
|
|||||||
Reference in New Issue
Block a user