Last active
April 29, 2017 17:17
-
-
Save mleko/d1d20899dac62200bdccbb05e7924ca8 to your computer and use it in GitHub Desktop.
Gitlab CI setup using docker image
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
image: golang:latest | |
stages: | |
- build | |
- test | |
before_script: | |
- go get github.com/tools/godep | |
- mkdir -p /go/src/gitlab.com | |
- cp -r /builds/$CI_PROJECT_NAMESPACE /go/src/gitlab.com/ | |
- cd /go/src/gitlab.com/$CI_PROJECT_PATH | |
- "[ -d Godeps ] || godep save" | |
build: | |
stage: build | |
tags: | |
- docker | |
script: | |
- godep restore | |
- godep go build | |
test: | |
stage: test | |
tags: | |
- docker | |
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