Skip to content
Snippets Groups Projects
Commit 38b30c57 authored by Pavel Antonov's avatar Pavel Antonov :asterisk:
Browse files

Merge branch 'feature/gitlab-golangci-lint' into 'master'

Добавлен запуск линтера для добавленных изменений

See merge request perxis/perxis-go!113
parents bb6ca6e9 0ec09e97
No related branches found
No related tags found
No related merge requests found
......@@ -8,11 +8,22 @@ run_tests:
- if: '$CI_PIPELINE_SOURCE == "merge_request_event" && ($CI_MERGE_REQUEST_TARGET_BRANCH_NAME == $CI_DEFAULT_BRANCH)'
stage: test
script:
- go fmt ./...
- go vet ./...
- go install gotest.tools/gotestsum@latest
- gotestsum --format testname --junitfile report.xml
- gotestsum --format testname --junitfile report.xml
artifacts:
when: always
reports:
junit: report.xml
lint:
image: golangci/golangci-lint:v1.55-alpine
rules:
- if: '$CI_PIPELINE_SOURCE == "merge_request_event" && ($CI_MERGE_REQUEST_TARGET_BRANCH_NAME == $CI_DEFAULT_BRANCH)'
stage: test
script:
- golangci-lint run --issues-exit-code 1 --print-issued-lines=false --new-from-rev $CI_MERGE_REQUEST_DIFF_BASE_SHA --out-format code-climate:gl-code-quality-report.json,line-number
artifacts:
reports:
codequality: gl-code-quality-report.json
paths:
- gl-code-quality-report.json
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