Fix golangci-lint by adding go mod tidy and specifying paths ./... for linting

This commit is contained in:
Damir Mukimov 2025-11-27 04:30:36 +01:00
parent 39fae4dbf8
commit afaf952a1a
No known key found for this signature in database
GPG Key ID: 42996CC7C73BC750
2 changed files with 13 additions and 4 deletions

View File

@ -55,11 +55,17 @@ jobs:
go-version: "1.25" go-version: "1.25"
cache: true cache: true
- name: Install dependencies
run: go mod download
- name: Tidy modules
run: go mod tidy
- name: golangci-lint - name: golangci-lint
uses: golangci/golangci-lint-action@v6 uses: golangci/golangci-lint-action@v6
with: with:
version: latest version: latest
args: --timeout=5m args: --timeout=5m ./...
# Testing and coverage (runs on PRs and pushes) # Testing and coverage (runs on PRs and pushes)
test: test:

View File

@ -2,9 +2,9 @@ name: CI
on: on:
push: push:
branches: [master] branches: [main]
pull_request: pull_request:
branches: [master] branches: [main]
jobs: jobs:
lint-and-test: lint-and-test:
@ -25,11 +25,14 @@ jobs:
- name: Install dependencies - name: Install dependencies
run: go mod download run: go mod download
- name: Tidy modules
run: go mod tidy
- name: Lint - name: Lint
uses: golangci/golangci-lint-action@v6 uses: golangci/golangci-lint-action@v6
with: with:
version: latest version: latest
args: --timeout=5m args: --timeout=5m ./...
- name: Test - name: Test
run: go test -v -race -coverprofile=coverage.out ./... run: go test -v -race -coverprofile=coverage.out ./...