debian-mirror-gitlab/lib/gitlab/ci/templates/Go.gitlab-ci.yml

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

31 lines
851 B
YAML
Raw Normal View History

2022-08-13 15:12:31 +05:30
# You can copy and paste this template into a new `.gitlab-ci.yml` file.
# You should not add this template to an existing `.gitlab-ci.yml` file by using the `include:` keyword.
#
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