From a4b7e8df328413f289c9b949f676826f989d34b5 Mon Sep 17 00:00:00 2001 From: Neven Miculinic Date: Wed, 27 Mar 2019 17:29:52 +0100 Subject: [PATCH] Added CI caching --- .gitlab-ci.yml | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) 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 ./...