arikawa/.gitlab-ci.yml

37 lines
887 B
YAML
Raw Normal View History

2020-05-30 21:45:22 +00:00
{
"image": "golang:alpine",
"variables": {
"GO111MODULE": "on",
"CGO_ENABLED": "0",
"COV": "/tmp/cov_results"
},
"before_script": [
"apk add git"
],
"stages": [
"test"
],
"build_test": {
"stage": "test",
"script": [
"go build ./..."
]
},
"unit_test": {
"stage": "test",
"script": [
"go test -v -coverprofile $COV ./...",
"go tool cover -func $COV"
]
},
"integration_test": {
"stage": "test",
"script": [
"[ ! \"$BOT_TOKEN\" ] && exit",
"go get ./...",
"timeout 120 go test -coverpkg \"./api,./gateway,./bot,./discord\" -coverprofile $COV -tags integration -v ./... github.com/mavolin/dismock/pkg/dismock",
"go tool cover -func $COV"
]
}
}