ci(gitlab): cache go modules
@@ -20,11 +20,16 @@ Reviewdog:
- master
stage: reviewdog
image: golang:latest
+ cache:
+ key:
+ files:
+ - go.sum
+ paths:
+ - .cache
before_script:
- export GO111MODULE=on
- # Set up $GOPATH and install reviewdog (Note that main repo is github.com)
- - ln -s /builds /go/src/github.com
- - cd /go/src/github.com/${CI_PROJECT_PATH}
+ - export GOPATH=${CI_PROJECT_DIR}/.cache
+ - export PATH=$PATH:$GOPATH/bin
- go install ./cmd/reviewdog
- ( cd linters && go get golang.org/x/lint/golint )
script:
