Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
P
perxis-go
Manage
Activity
Members
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Package Registry
Operate
Terraform modules
Analyze
Contributor analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
perxis
perxis-go
Commits
0ec09e97
Commit
0ec09e97
authored
1 year ago
by
Alena Petraki
Browse files
Options
Downloads
Patches
Plain Diff
Добавлен запуск линтера для добавленных изменений
parent
bb6ca6e9
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
.gitlab-ci.yml
+14
-3
14 additions, 3 deletions
.gitlab-ci.yml
with
14 additions
and
3 deletions
.gitlab-ci.yml
+
14
−
3
View file @
0ec09e97
...
...
@@ -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
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment