DEV Community πŸ‘©β€πŸ’»πŸ‘¨β€πŸ’»

DEV Community πŸ‘©β€πŸ’»πŸ‘¨β€πŸ’» is a community of 963,503 amazing developers

We're a place where coders share, stay up-to-date and grow their careers.

Create account Log in
Tymoteusz Blazejczyk
Tymoteusz Blazejczyk

Posted on • Updated on

Handy Gitlab CI YAML job templates for Go projects

Various useful and handy GitLab CI YAML templates for typical GitLab CI tasks.

Project site: https://gitlab.com/tymonx/gitlab-ci

General Features

  • Supporting validating, building, testing and auto-documenting projects out-of-box
  • Automating various and mostly typical GitLab CI tasks
  • Extending GitLab CI like with parallel download with caching support
  • Easy to use with the GitLab CI include keyword in your .gitlab-ci.yml files

Go Features

  • Automatically installing required Go tools for validating, testing and documenting project
  • Validating Go source files imports with the goimports tool
  • Validating Go source files errors with the errcheck tool
  • Validating Go source files format with the gofmt tool
  • Linting Go source files with the revive, the golangci-lint and the golint tools
  • Building Go source files
  • Testing Go project
  • Generating Go coverage result, text and HTML reports
  • Generating JUnit test XML report for GitLab Merge Requests
  • Generating Cobertura coverage XML report for GitLab Merge Requests
  • Validating Go coverage value with customazible coverage threshold
  • Colorizing Go imports and format validation with the colordiff tool
  • Colorizing Go tests with the richgo tool
  • Colorizing Go coverage results and format nicely with the column tool
  • Generating static HTML source code documentation with the godoc tool
  • Generating static HTML coverage report with the go tool cover tool
  • Uploading static HTML source code documentation and coverage report to GitLab Pages for browsing

Links

Top comments (0)

🌚 Browsing with dark mode makes you a better developer.

It's a scientific fact.