mirror of
https://github.com/SamyRai/tercul-backend.git
synced 2025-12-27 02:51:34 +00:00
Fix golangci-lint by adding go mod tidy and specifying paths ./... for linting
This commit is contained in:
parent
39fae4dbf8
commit
afaf952a1a
8
.github/workflows/ci-cd.yml
vendored
8
.github/workflows/ci-cd.yml
vendored
@ -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:
|
||||
|
||||
9
.github/workflows/ci.yml
vendored
9
.github/workflows/ci.yml
vendored
@ -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 ./...
|
||||
|
||||
Loading…
Reference in New Issue
Block a user