Skip to content
Snippets Groups Projects
Commit bc25bea5 authored by Thomas Schneider's avatar Thomas Schneider Committed by Thomas Schneider
Browse files

ci: Add golangci-lint job

parent 396657a2
No related branches found
No related tags found
1 merge request!1Merge GitLab CI config
Pipeline #3240 passed with warnings
---
image: debian:buster
variables:
GOCACHE: $CI_PROJECT_DIR/.gocache
GOPATH: $CI_PROJECT_DIR/.go
......@@ -11,12 +9,13 @@ cache:
- .gocache
- .go
build:
image: debian:buster
stage: build
before_script:
- echo 'deb http://deb.debian.org/debian buster-backports main' > /etc/apt/sources.list.d/backports.list
- apt-get update && apt-get -qq -y -t buster-backports install golang git
- go version
build:
script:
- go build -o $CI_PROJECT_NAME-$GOOS-$GOARCH
artifacts:
......@@ -29,3 +28,17 @@ build:
GOARCH:
- amd64
- arm
lint:
image: golangci/golangci-lint:v1.39-alpine
stage: test
allow_failure: true
needs: []
script:
- golangci-lint run -v --max-issues-per-linter=0 --max-same-issues=0 --out-format=junit-xml --timeout=10m > golangci-output.xml
artifacts:
paths:
- golangci-output.xml
reports:
junit: golangci-output.xml
expire_in: 7 days
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment