Added CI caching
This commit is contained in:
parent
eb5c6c4015
commit
a4b7e8df32
@ -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 ./...
|
||||
|
Loading…
Reference in New Issue
Block a user