From ebbd6cc33e0ab02d113dd694015e184349569c43 Mon Sep 17 00:00:00 2001 From: Siddharth Betala Date: Tue, 26 May 2026 16:26:39 +0200 Subject: [PATCH] build: update pre commit hook and enable github actions --- .github/workflows/pre-commit.yml | 27 +++++++++++++++++++++++++++ .pre-commit-config.yaml | 2 ++ pyproject.toml | 2 ++ 3 files changed, 31 insertions(+) create mode 100644 .github/workflows/pre-commit.yml diff --git a/.github/workflows/pre-commit.yml b/.github/workflows/pre-commit.yml new file mode 100644 index 0000000..96488e6 --- /dev/null +++ b/.github/workflows/pre-commit.yml @@ -0,0 +1,27 @@ +name: Pre-commit + +on: + push: + pull_request: + +jobs: + pre-commit: + runs-on: ubuntu-latest + + steps: + - name: Checkout + uses: actions/checkout@v5 + with: + submodules: recursive + + - name: Install uv + uses: astral-sh/setup-uv@v6 + + - name: Install Python + run: uv python install + + - name: Install dependencies + run: uv sync --dev --locked + + - name: Run pre-commit + run: uv run pre-commit run --all-files diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 9ebfbd7..dac226e 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -1,3 +1,5 @@ +exclude: ^external/ + repos: - repo: local hooks: diff --git a/pyproject.toml b/pyproject.toml index 4c5d6d2..1d30d04 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -24,6 +24,8 @@ dev = [ [tool.ruff] line-length = 100 target-version = "py312" +extend-exclude = ["external"] + [tool.ruff.lint] select = ["E", "F", "B", "I", "C90", "UP", "RUF"] ignore = [