diff --git a/.travis.yml b/.travis.yml index 389e1492..da7030d7 100644 --- a/.travis.yml +++ b/.travis.yml @@ -2,13 +2,13 @@ language: go matrix: include: - go: "1.11.x" - env: RACE=TRUE USE_LINT=TRUE + env: RACE=true LINT=true - go: "1.11.x" - env: RACE=FALSE USE_LINT=TRUE + env: ITEST=true COVER=true LINT=true - go: "1.10.x" - env: RACE=TRUE USE_LINT=FALSE + env: RACE=true LINT=false - go: "1.10.x" - env: RACE=FALSE USE_LINT=FALSE + env: ITEST=true COVER=true LINT=false sudo: required install: @@ -18,7 +18,23 @@ install: - export PATH=$PATH:$PWD/linux-amd64/ script: - - make travis + # Common for all builds. + - make dep + - make btcd + + # Run linter if LINT=true. + - 'if [ "$LINT" = true ]; then make lint ; fi' + + # Run unit tests with race condition detector. + - 'if [ "$RACE" = true ]; then make unit-race ; fi' + + # Run integration tests. + - 'if [ "$ITEST" = true ]; then make build ; fi' + - 'if [ "$ITEST" = true ]; then make itest-only ; fi' + + # Run unit tests and generate coverage report. + - 'if [ "$COVER" = true ]; then make unit-cover; fi' + - 'if [ "$COVER" = true ]; then make goveralls; fi' after_script: - echo "Uploading to termbin.com..." && find *.log | xargs -I{} sh -c "cat {} | nc termbin.com 9999 | xargs -r0 printf '{} uploaded to %s'"