diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 76aba28..b29623e 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -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 ./...