From 1f371fa953f7e56ff5553b712936738fd99fc9ee Mon Sep 17 00:00:00 2001 From: Matthew Jaffee Date: Tue, 1 Feb 2022 16:58:40 -0600 Subject: [PATCH] turn off verbose on linter, add smoke build if your code doesn't build, the linter errors can be very misleading --- .gitlab/.gitlab-ci.yml | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/.gitlab/.gitlab-ci.yml b/.gitlab/.gitlab-ci.yml index 37dbf92e7..4e7d6f5db 100644 --- a/.gitlab/.gitlab-ci.yml +++ b/.gitlab/.gitlab-ci.yml @@ -14,6 +14,16 @@ stages: - gauntlet - post build +smoke build: + image: golang:$GOVERSION + stage: lint + allow_failure: false + rules: + - if: '$CI_PIPELINE_SOURCE == "push" || $CI_PIPELINE_SOURCE == "schedule" || $CI_PIPELINE_SOURCE == "web"' + script: + - echo "Let's just see if it compiles... (sometimes the linter gives unclear errors if it doesn't)" + - go build ./... + golangci-lint: image: golangci/golangci-lint:v1.39.0 stage: lint @@ -22,7 +32,7 @@ golangci-lint: - if: '$CI_PIPELINE_SOURCE == "push" || $CI_PIPELINE_SOURCE == "schedule" || $CI_PIPELINE_SOURCE == "web"' script: - echo "Checking for issues in new code" - - golangci-lint run -v + - golangci-lint run build lattice: stage: test