CI: Bump Go and golangci-lint versions (#1313)

This commit is contained in:
Adrian Gallagher
2023-08-11 14:06:56 +10:00
committed by GitHub
parent 26692669c6
commit b25037dabc
7 changed files with 12 additions and 13 deletions

View File

@@ -54,7 +54,7 @@ before_test:
test_script:
# test back-end
- go install github.com/golangci/golangci-lint/cmd/golangci-lint@v1.52.2
- go install github.com/golangci/golangci-lint/cmd/golangci-lint@v1.54.0
- '%GOPATH%\bin\golangci-lint.exe run --verbose'
- ps: >-
if($env:APPVEYOR_SCHEDULED_BUILD -eq 'true') {

View File

@@ -8,8 +8,8 @@ jobs:
- uses: actions/checkout@v3
- uses: actions/setup-go@v4
with:
go-version: '1.20.x'
go-version: '1.21.x'
- name: golangci-lint
uses: golangci/golangci-lint-action@v3
with:
version: v1.52.2
version: v1.54.0

View File

@@ -12,7 +12,7 @@ jobs:
- name: Setup Go
uses: actions/setup-go@v4
with:
go-version: 1.20.x
go-version: 1.21.x
- name: Setup build depends
run: |

View File

@@ -1,7 +1,7 @@
on: [push, pull_request]
name: CI
env:
GO_VERSION: 1.20.x
GO_VERSION: 1.21.x
jobs:
backend-psql:
name: GoCryptoTrader back-end with PSQL

View File

@@ -30,7 +30,7 @@ linters:
# - cyclop
# - deadcode // abandoned by its owner, replaced by unused
- decorder
- depguard
# - depguard
- dogsled
# - dupl
- dupword
@@ -68,6 +68,7 @@ linters:
- gomodguard
- goprintffuncname
- gosec
# - gosmopolitan
- grouper
# - ifshort // deprecated by its owner
# - importas
@@ -79,9 +80,10 @@ linters:
# - maintidx
- makezero
# - maligned // deprecated by its owner, replaced by govet 'fieldalignment'
- mirror
- misspell
# - musttag
- nakedret
# - nakedret
# - nestif
- nilerr
# - nilnil
@@ -117,16 +119,13 @@ linters:
- whitespace
# - wrapcheck
# - wsl
# - zerologlint
linters-settings:
govet:
check-shadowing: true
goconst:
min-occurrences: 6
depguard:
list-type: blacklist
# lll:
# line-length: 80 # NOTE: we'll enforce this at a later point
gocritic:
enabled-tags:
- performance

View File

@@ -1,4 +1,4 @@
FROM golang:1.20 as build
FROM golang:1.21 as build
WORKDIR /go/src/github.com/thrasher-corp/gocryptotrader
COPY . .
RUN GO111MODULE=on go mod vendor

View File

@@ -1,6 +1,6 @@
LDFLAGS = -ldflags "-w -s"
GCTPKG = github.com/thrasher-corp/gocryptotrader
LINTPKG = github.com/golangci/golangci-lint/cmd/golangci-lint@v1.52.2
LINTPKG = github.com/golangci/golangci-lint/cmd/golangci-lint@v1.54.0
LINTBIN = $(GOPATH)/bin/golangci-lint
GCTLISTENPORT=9050
GCTPROFILERLISTENPORT=8085