good morning!!!!
Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
J
jrpc
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package registry
Container registry
Harbor Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
open
jrpc
Commits
61b2a8ff
Commit
61b2a8ff
authored
Jul 20, 2023
by
a
Browse files
Options
Downloads
Patches
Plain Diff
Update .gitlab-ci.yml file
parent
7e872a2f
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Pipeline
#23856
failed
Jul 20, 2023
Changes
1
Pipelines
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
.gitlab-ci.yml
+49
-0
49 additions, 0 deletions
.gitlab-ci.yml
with
49 additions
and
0 deletions
.gitlab-ci.yml
0 → 100644
+
49
−
0
View file @
61b2a8ff
.go-cache
:
variables
:
GOPATH
:
$CI_PROJECT_DIR/.go
before_script
:
-
mkdir -p .go
cache
:
paths
:
-
.go/pkg/mod/
stages
:
-
lint
-
test
lint
:
image
:
registry.gitlab.com/gitlab-org/gitlab-build-images:golangci-lint-alpine
stage
:
tint
extends
:
.go-cache
script
:
# Use default .golangci.yml file from the image if one is not present in the project root.
-
"
[
-e
.golangci.yml
]
||
cp
/golangci/.golangci.yml
."
# Write the code coverage report to gl-code-quality-report.json
# and print linting issues to stdout in the format: path/to/file:line description
# remove `--issues-exit-code 0` or set to non-zero to fail the job if linting issues are detected
-
golangci-lint run --issues-exit-code 0 --print-issued-lines=false --out-format code-climate:gl-code-quality-report.json,line-number
artifacts
:
when
:
always
reports
:
codequality
:
gl-code-quality-report.json
paths
:
-
gl-code-quality-report.json
coverage
:
stage
:
test
image
:
golang:1.20-alpine
coverage
:
'
/\(statements\)(?:\s+)?(\d+(?:\.\d+)?%)/'
extends
:
.go-cache
script
:
-
go run gotest.tools/gotestsum@latest --junitfile report.xml --format testname -- -coverprofile=coverage.txt -covermode count ./...
-
go tool cover -func=coverage.txt
-
go run github.com/boumenot/gocover-cobertura@master < coverage.txt > coverage.xml
artifacts
:
reports
:
junit
:
report.xml
coverage_report
:
coverage_format
:
cobertura
path
:
coverage.xml
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