From 0f0070ba3d6a9cbd0d0fed152b389637cb9a8c84 Mon Sep 17 00:00:00 2001 From: Jaroslav Safka Date: Wed, 20 Aug 2025 11:13:31 +0200 Subject: [PATCH] ci: use pre-commit.ci service for linting --- .github/workflows/test_esptool.yml | 16 ---------------- .pre-commit-config.yaml | 8 ++++++++ README.md | 1 + 3 files changed, 9 insertions(+), 16 deletions(-) diff --git a/.github/workflows/test_esptool.yml b/.github/workflows/test_esptool.yml index c3568d3..a370ea7 100644 --- a/.github/workflows/test_esptool.yml +++ b/.github/workflows/test_esptool.yml @@ -66,19 +66,3 @@ jobs: run: | ./ci/download_flasher_stubs.py git diff --exit-code - - lint_esptool: - runs-on: ubuntu-22.04 - steps: - - name: Checkout - uses: actions/checkout@master - - - name: Set up Python 3.10 - uses: actions/setup-python@master - with: - python-version: "3.10" - - - name: Run pre-commit hooks - run: | - pip install --extra-index-url https://dl.espressif.com/pypi -e .[dev] - pre-commit run --all-files diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index e8c451f..54a53bd 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -1,3 +1,10 @@ +ci: + autofix_commit_msg: | + Apply automatic fixes from pre-commit hooks + autofix_prs: true + autoupdate_commit_msg: 'ci: Bump pre-commit hooks' + autoupdate_schedule: quarterly + repos: - repo: https://github.com/astral-sh/ruff-pre-commit rev: v0.9.6 @@ -31,5 +38,6 @@ repos: stages: [commit-msg] args: - --allow-breaking + default_stages: [pre-commit] default_install_hook_types: [pre-commit, commit-msg] diff --git a/README.md b/README.md index 40815f4..779abf1 100644 --- a/README.md +++ b/README.md @@ -3,6 +3,7 @@ A Python-based, open-source, platform-independent serial utility for flashing, provisioning, and interacting with Espressif SoCs. [![Test esptool](https://github.com/espressif/esptool/actions/workflows/test_esptool.yml/badge.svg?branch=master)](https://github.com/espressif/esptool/actions/workflows/test_esptool.yml) [![Build esptool](https://github.com/espressif/esptool/actions/workflows/build_esptool.yml/badge.svg?branch=master)](https://github.com/espressif/esptool/actions/workflows/build_esptool.yml) +[![pre-commit.ci status](https://results.pre-commit.ci/badge/github/espressif/esptool/master.svg)](https://results.pre-commit.ci/latest/github/espressif/esptool/master) ## Documentation