Commit a43e31fb by Arve Knudsen Committed by GitHub

CircleCI: Reduce memory usage of golangci-lint (#22970)

* CircleCI: Fix golangci-lint OOM by reducing concurrency and tweaking GC
parent d8b346f4
......@@ -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:
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment