Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save montao/abfe888a3cc1e11a42de5fa70600abfc to your computer and use it in GitHub Desktop.
Save montao/abfe888a3cc1e11a42de5fa70600abfc to your computer and use it in GitHub Desktop.
Example Gitlab CI setup for Go using the official golang docker image
image: golang:1.7
stages:
- build
- test
before_script:
- go get github.com/tools/godep
- cp -r /builds/user /go/src/github.com/user/
- cd /go/src/github.com/user/repo
build-my-project:
stage: build
script:
- godep restore
- godep go build
test-my-project:
stage: test
script:
- godep restore
- godep go test -v -cover ./...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment