From 8da61ca719d35cf9b53cae2caf919e89691f8821 Mon Sep 17 00:00:00 2001 From: Samuel K Date: Thu, 25 Jun 2026 17:38:23 -0500 Subject: [PATCH] chore: migrate pre-commit CI to prek and pin golangci-lint --- .github/workflows/lint.yml | 2 +- .github/workflows/pre-commit.yml | 25 +------------------------ requirements.txt | 1 - 3 files changed, 2 insertions(+), 26 deletions(-) delete mode 100644 requirements.txt diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index c21cbc12..224b26c1 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -23,7 +23,7 @@ jobs: - name: golangci-lint uses: golangci/golangci-lint-action@v9 with: - version: latest + version: v2.12.2 only-new-issues: true - name: megalinter diff --git a/.github/workflows/pre-commit.yml b/.github/workflows/pre-commit.yml index 815a9eab..1643e952 100644 --- a/.github/workflows/pre-commit.yml +++ b/.github/workflows/pre-commit.yml @@ -15,27 +15,4 @@ jobs: steps: - uses: actions/checkout@v6 - - uses: actions/setup-python@v6 - with: - cache: pip - python-version: 3.x - - - run: pip install -r requirements.txt - - - uses: actions/setup-go@v6 - with: - go-version-file: go.mod - - - uses: golangci/golangci-lint-action@v9 - with: - version: latest - install-only: true - - - run: go install golang.org/x/tools/cmd/goimports@latest - - - uses: actions/cache@v5 - with: - path: ~/.cache/pre-commit - key: pre-commit-${{ hashFiles('.pre-commit-config.yaml') }} - - - run: pre-commit run --all-files + - uses: j178/prek-action@v2 diff --git a/requirements.txt b/requirements.txt deleted file mode 100644 index 00234e2c..00000000 --- a/requirements.txt +++ /dev/null @@ -1 +0,0 @@ -pre_commit>=4.3.0