Handy Gitlab CI YAML job templates for Go projects

tymonx profile image Tymoteusz Blazejczyk Updated on ・2 min read

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


Posted on May 14 by:

tymonx profile

Tymoteusz Blazejczyk


Professional FPGA and Embedded Systems Design Engineer. Expert in a true modern FPGA development adopting the newest software development trends and patterns. Knowledge and experience in RTL/SW/FW dev


markdown guide