1
0
Fork 0

run go tests

This commit is contained in:
Sean Sube 2018-03-31 09:52:12 -05:00
parent e4024e4d8c
commit 20fcbce330
2 changed files with 32 additions and 3 deletions

View File

@ -4,12 +4,15 @@ stages:
- test
- package
build:go:
stage: build
.go: &go-job
image: andrexus/golang-dep
tags:
- runner:k8s
build:go:
<<: *go-job
stage: build
script:
- time dep ensure
- go build
@ -22,7 +25,23 @@ build:go:
expire_in: 1 hour
cache:
key: "${CI_COMMIT_REF_SLUG}"
untracked: true
policy: pull-push
paths:
- vendor
test:go:
<<: *go-job
stage: test
cache:
key: "${CI_COMMIT_REF_SLUG}"
policy: pull
dependencies:
- build:go
script:
- go test
variables:
GOPATH: /build
package:docker:
stage: package

10
main_test.go Normal file
View File

@ -0,0 +1,10 @@
package main
import (
"fmt"
"testing"
)
func TestSomething(t *testing.T) {
fmt.Println("hello")
}