Speed up travis-ci builds by caching dependencies

This commit is contained in:
Dale Hui 2018-01-19 17:57:14 -08:00
parent 53606261bf
commit 4ebf080da8
1 changed files with 12 additions and 3 deletions

View File

@ -11,7 +11,16 @@ env:
# TODO: https://docs.docker.com/engine/installation/linux/ubuntu/
# pre-provision with travis docker setup and pin down docker version in install step
services:
- docker
- docker
before_cache:
- rm -rf $GOPATH/src/github.com/golang-migrate
- rm -rf $GOPATH/pkg/**/github.com/golang-migrate
cache:
directories:
- $GOPATH/src
- $GOPATH/pkg
install:
- make deps
@ -20,10 +29,10 @@ install:
- go get github.com/mattn/goveralls
script:
- make test
- make test COVERAGE_DIR=/tmp/coverage
after_success:
- goveralls -service=travis-ci -coverprofile .coverage/combined.txt
- goveralls -service=travis-ci -coverprofile /tmp/coverage/combined.txt
- make list-external-deps > dependency_tree.txt && cat dependency_tree.txt
before_deploy: