Commit 4c33832c authored by Edmund Ochieng's avatar Edmund Ochieng

update unit test command

parent d20844a7
image: golang:1.14
stages:
- prepare
- test
- build
variables:
GOPATH: ${CI_PROJECT_DIR}/.go
before_script:
- mkdir -p .go
- go get -u github.com/onsi/ginkgo/ginkgo
- go get -u golang.org/x/lint/golint
.cache:
cache:
key: ${CI_COMMIT_REF_SLUG}
paths:
- .go/
lint_code:
stage: prepare
script:
- .go/bin/golint -set_exit_status $(go list ./... | grep -v /vendor/)
extends: .cache
unit_tests:
stage: test
script:
- mkdir coverage
- .go/bin/go test ./... -coverprofile cover.out
extends: .cache
build_all:
stage: build
script:
- CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -a -installsuffix cgo ./...
extends: .cache
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment