Added CI caching

This commit is contained in:
Neven Miculinic 2019-03-27 17:29:52 +01:00
parent eb5c6c4015
commit a4b7e8df32

View File

@ -3,10 +3,13 @@ stages:
go_build:
stage: build
image: golang:1.12
script:
- go mod vendor
- go test ./...
cache:
key: ${CI_COMMIT_REF_SLUG}
paths:
- vendor/
- .cache
script:
- mkdir -p .cache/cache
- mkdir -p .cache/go
- export GOCACHE="$CI_PROJECT_DIR/.cache/cache"
- export GOPATH="$CI_PROJECT_DIR/.cache/go"
- go test ./...