diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 19d2bb45..e65461f8 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -16,6 +16,15 @@ jobs: with: python-version: 3.x + - uses: actions/cache@v4 + with: + path: ~/.cache/golangci-lint + key: pre-commit-golangci-lint|${{ env.pythonLocation }}|${{ hashFiles('.pre-commit-config.yaml') }}|${{ hashFiles('**/*.go') }} + restore-keys: | + pre-commit-golangci-lint|${{ env.pythonLocation }}|${{ hashFiles('.pre-commit-config.yaml') }}| + pre-commit-golangci-lint|${{ env.pythonLocation }}| + pre-commit-golangci-lint| + - uses: pre-commit/action@v3.0.1 test: @@ -36,22 +45,6 @@ jobs: with: token: ${{ secrets.CODECOV_TOKEN }} - lint: - name: Lint - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v4 - - uses: actions/setup-go@v5 - with: - go-version-file: go.mod - - - uses: golangci/golangci-lint-action@v6 - with: - version: v1.62.2 # renovate: datasource=github-releases depName=golangci/golangci-lint - - # In general linting is quite fast with warm caches, but a fresh run might take some time. - args: --timeout 5m - deploy-manifests: name: Check deployment manifests runs-on: ubuntu-latest diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index ca811bf3..d04dbf77 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -50,3 +50,10 @@ repos: rev: v0.10.0.1 hooks: - id: shellcheck + + - repo: https://github.com/golangci/golangci-lint + rev: v1.62.2 + hooks: + - id: golangci-lint-full + args: [--timeout=5m] + language_version: 1.23.4 # renovate: datasource=golang-version