Merge pull request #908 from prymitive/fix-go-cache

fix(ci): don't create new Go cache archive on every Travis CI job
This commit is contained in:
Łukasz Mierzwa
2019-08-30 11:01:40 +01:00
committed by GitHub

View File

@@ -6,6 +6,14 @@ defaults_go: &DEFAULTS_GO
# https://restic.net/blog/2018-09-02/travis-build-cache
- $HOME/.cache/go-build
- $HOME/gopath/pkg/mod
before_cache:
# this log file is updated on every get/set operation
# so it forces new cache archive on every build
# remove it before creating cache archive
- rm -vf $HOME/.cache/go-build/log.txt
# force fixed mtime on all files so travis doesn't consider
# these as updated
- find $HOME/.cache/go-build/ -type f -exec touch -t 201909010000 {} \;
defaults_js: &DEFAULTS_JS
language: node_js