mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
CircleCI: Reduce memory usage of golangci-lint (#22970)
* CircleCI: Fix golangci-lint OOM by reducing concurrency and tweaking GC
This commit is contained in:
parent
d8b346f441
commit
a43e31fbf9
@ -714,12 +714,23 @@ jobs:
|
||||
environment:
|
||||
# we need CGO because of go-sqlite3
|
||||
CGO_ENABLED: 1
|
||||
# Reduce golangci-lint memory usage (default is 100)
|
||||
GOGC: 20
|
||||
working_directory: /go/src/github.com/grafana/grafana
|
||||
steps:
|
||||
- checkout
|
||||
- run:
|
||||
name: Lint Go
|
||||
command: "make lint-go"
|
||||
command: |
|
||||
# Build linters
|
||||
make scripts/go/bin/golangci-lint scripts/go/bin/revive scripts/go/bin/gosec
|
||||
go vet ./pkg/...
|
||||
# Avoid golangci-lint concurrency since it tends to run out of memory
|
||||
./scripts/go/bin/golangci-lint run --config scripts/go/configs/.golangci.yml -j 1 ./pkg/...
|
||||
./scripts/go/bin/revive -formatter stylish -config ./scripts/go/configs/revive.toml ./pkg/...
|
||||
./scripts/go/bin/revive -formatter stylish ./pkg/services/alerting/...
|
||||
./scripts/go/bin/gosec -quiet -exclude=G104,G107,G108,G201,G202,G204,G301,G304,G401,G402,G501 \
|
||||
-conf=./scripts/go/configs/gosec.json ./pkg/...
|
||||
|
||||
test-frontend:
|
||||
docker:
|
||||
|
Loading…
Reference in New Issue
Block a user