Skip to content
Snippets Groups Projects
Commit f4104617 authored by Alina Schmidt's avatar Alina Schmidt
Browse files

test linter job

parent 6f9e09b2
No related branches found
No related tags found
No related merge requests found
Pipeline #73493 passed with warnings
...@@ -16,6 +16,7 @@ variables: ...@@ -16,6 +16,7 @@ variables:
stages: stages:
- build - build
- test - test
- lint
- deploy - deploy
.image: .image:
...@@ -43,6 +44,31 @@ test-job: ...@@ -43,6 +44,31 @@ test-job:
- go mod download - go mod download
- go test -v ./... - go test -v ./...
lint-job:
stage: lint
extends:
- .image
image: golangci/golangci-lint:v1.55.2-alpine
variables:
CONFIG_FILE_LINK: https://gitlab.com/gitlab-ci-utils/config-files/-/raw/10.1.1/Linters/.golangci.yml
rules:
- exists:
- '**/*.go'
before_script:
- apk add jq
- if [ ! -f .golangci.yml ]; then (wget $CONFIG_FILE_LINK) fi
- cd DefineAndRunPipeline/webservice
script:
- >
golangci-lint run --out-format code-climate $LINT_GO_CLI_ARGS |
tee gl-code-quality-report.json |
jq -r '.[] | "\(.location.path):\(.location.lines.begin) \(.description)"'
artifacts:
reports:
codequality: gl-code-quality-report.json
paths:
- DefineAndRunPipeline/webservice/$GO_BIN_PATH*/gl-code-quality-report.json
allow_failure: true
deploy-job: deploy-job:
stage: deploy stage: deploy
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment