{ "name": "Go", "description": "Build and test with [Go](https://golang.org/).", "template_path": "templates/gitlab-ci-golang.yml", "kind": "build", "variables": [ { "name": "GO_IMAGE", "description": "The Docker image used to run Go (build+test or build only) - **it is highly recommended to set the specific version your project needs**", "default": "golang:buster" }, { "name": "GOPROXY", "description": "URL of Go module proxy (see [Go env](https://golang.org/cmd/go/#hdr-Environment_variables))", "advanced": true }, { "name": "GO_TEST_IMAGE", "description": "Specific Docker image used to run Go tests (as a separate job)", "advanced": true }, { "name": "GO_BUILD_ARGS", "description": "Arguments used by the build command", "default": "install -mod=readonly ./...", "advanced": true }, { "name": "GO_TEST_ARGS", "description": "Arguments used by the test command", "default": "test -mod=readonly -v -coverprofile=reports/coverage.out -race ./...", "advanced": true }, { "name": "GO_LIST_ARGS", "description": "Arguments used by the list command", "default": "list -u -m -mod=readonly -json all", "advanced": true } ], "features": [ { "id": "golangci-lint", "name": "GolangCI-Lint", "description": "[GolangCI-Lint](https://github.com/golangci/golangci-lint) analysis", "variables": [ { "name": "GO_CI_LINT_IMAGE", "description": "The Docker image used to run `golangci-lint`", "default": "golangci/golangci-lint:latest-alpine" }, { "name": "GO_CI_LINT_ARGS", "description": "`golangci-lint` [command line arguments](https://github.com/golangci/golangci-lint#command-line-options)", "default": "-E gosec,goimports ./...", "advanced": true } ] }, { "id": "go-mod-outdated", "name": "Go-mod-outdated", "description": "[Go-mod-outdated](https://github.com/psampaz/go-mod-outdated) analysis", "variables": [ { "name": "GO_MOD_OUTDATED_ARGS", "description": "`god-mod-outdated` [command line arguments](https://github.com/psampaz/go-mod-outdated#usage", "default": "-update -direct -style markdown -ci", "advanced": true } ] } ] }