From afaf952a1aa113ba0ea430a9a55de38544318bc8 Mon Sep 17 00:00:00 2001 From: Damir Mukimov Date: Thu, 27 Nov 2025 04:30:36 +0100 Subject: [PATCH] Fix golangci-lint by adding go mod tidy and specifying paths ./... for linting --- .github/workflows/ci-cd.yml | 8 +++++++- .github/workflows/ci.yml | 9 ++++++--- 2 files changed, 13 insertions(+), 4 deletions(-) diff --git a/.github/workflows/ci-cd.yml b/.github/workflows/ci-cd.yml index b75981b..7a295c2 100644 --- a/.github/workflows/ci-cd.yml +++ b/.github/workflows/ci-cd.yml @@ -55,11 +55,17 @@ jobs: go-version: "1.25" cache: true + - name: Install dependencies + run: go mod download + + - name: Tidy modules + run: go mod tidy + - name: golangci-lint uses: golangci/golangci-lint-action@v6 with: version: latest - args: --timeout=5m + args: --timeout=5m ./... # Testing and coverage (runs on PRs and pushes) test: diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index c1cf92b..575fcb4 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -2,9 +2,9 @@ name: CI on: push: - branches: [master] + branches: [main] pull_request: - branches: [master] + branches: [main] jobs: lint-and-test: @@ -25,11 +25,14 @@ jobs: - name: Install dependencies run: go mod download + - name: Tidy modules + run: go mod tidy + - name: Lint uses: golangci/golangci-lint-action@v6 with: version: latest - args: --timeout=5m + args: --timeout=5m ./... - name: Test run: go test -v -race -coverprofile=coverage.out ./...