mirror of
https://github.com/SamyRai/tercul-backend.git
synced 2025-12-27 04:01: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"
|
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:
|
||||||
|
|||||||
9
.github/workflows/ci.yml
vendored
9
.github/workflows/ci.yml
vendored
@ -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 ./...
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user