2021-09-30 23:02:18 +05:30
|
|
|
# To contribute improvements to CI/CD templates, please follow the Development guide at:
|
|
|
|
# https://docs.gitlab.com/ee/development/cicd/templates.html
|
|
|
|
# This specific template is located at:
|
|
|
|
# https://gitlab.com/gitlab-org/gitlab/-/blob/master/lib/gitlab/ci/templates/Go.gitlab-ci.yml
|
|
|
|
|
2017-08-17 22:00:37 +05:30
|
|
|
image: golang:latest
|
|
|
|
|
|
|
|
stages:
|
2019-09-04 21:01:54 +05:30
|
|
|
- test
|
|
|
|
- build
|
|
|
|
- deploy
|
2017-08-17 22:00:37 +05:30
|
|
|
|
|
|
|
format:
|
2019-09-04 21:01:54 +05:30
|
|
|
stage: test
|
|
|
|
script:
|
|
|
|
- go fmt $(go list ./... | grep -v /vendor/)
|
|
|
|
- go vet $(go list ./... | grep -v /vendor/)
|
|
|
|
- go test -race $(go list ./... | grep -v /vendor/)
|
2017-08-17 22:00:37 +05:30
|
|
|
|
|
|
|
compile:
|
2019-09-04 21:01:54 +05:30
|
|
|
stage: build
|
|
|
|
script:
|
2022-06-21 17:19:12 +05:30
|
|
|
- mkdir -p mybinaries
|
|
|
|
- go build -o mybinaries ./...
|
2019-09-04 21:01:54 +05:30
|
|
|
artifacts:
|
|
|
|
paths:
|
2022-06-21 17:19:12 +05:30
|
|
|
- mybinaries
|