stages:
- build
go_build:
stage: build
image: golang:1.12
cache:
key: ${CI_COMMIT_REF_SLUG}
paths:
- .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 ./...