travis: execute make travis step by step

Instead of calling 'make travis' directly, we call each step. This lets us
better track how much time is spent on each.

Also note that we execute 'itest-only' instead of 'itest', and instead
execute the dependencies (btcd, build) manually first.

We explicitly set the ITEST environment variable, for readability, and
define a new COVER. This is currently true when ITEST=true to keep the
existing build configuration, but will later be configured to be
independent.
This commit is contained in:
Johan T. Halseth 2018-10-11 10:31:05 +02:00
parent b98ab723ee
commit 9e950b4739
No known key found for this signature in database
GPG Key ID: 15BAADA29DA20D26

View File

@ -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'"