2016-06-09 01:12:13 +03:00
|
|
|
language: go
|
2018-10-11 11:31:05 +03:00
|
|
|
cache:
|
|
|
|
directories:
|
|
|
|
- $GOCACHE
|
2018-11-29 04:18:21 +03:00
|
|
|
- $GOPATH/pkg/mod
|
2018-10-11 11:31:05 +03:00
|
|
|
- $GOPATH/src/github.com/btcsuite
|
|
|
|
- $GOPATH/src/github.com/golang
|
|
|
|
- $GOPATH/src/gopkg.in/alecthomas
|
|
|
|
|
2018-11-16 13:08:16 +03:00
|
|
|
go:
|
|
|
|
- "1.11.x"
|
|
|
|
|
|
|
|
env:
|
2018-10-11 11:31:05 +03:00
|
|
|
global:
|
|
|
|
- GOCACHE=$HOME/.go-build
|
2018-11-16 13:08:16 +03:00
|
|
|
matrix:
|
2018-11-30 08:27:49 +03:00
|
|
|
- RACE=true
|
2018-11-16 13:08:16 +03:00
|
|
|
- ITEST=true
|
2018-11-30 08:27:49 +03:00
|
|
|
- COVER=true
|
2018-10-11 11:31:05 +03:00
|
|
|
|
2018-01-17 19:07:31 +03:00
|
|
|
sudo: required
|
2016-07-26 02:39:22 +03:00
|
|
|
install:
|
2018-01-17 19:07:31 +03:00
|
|
|
- sudo add-apt-repository -y ppa:bitcoin/bitcoin -y
|
|
|
|
- sudo apt-get update -q
|
|
|
|
- sudo apt-get install bitcoind -y
|
2017-06-21 17:12:53 +03:00
|
|
|
- export PATH=$PATH:$PWD/linux-amd64/
|
2018-10-11 11:31:05 +03:00
|
|
|
|
2016-07-26 02:39:22 +03:00
|
|
|
script:
|
2018-11-30 08:40:47 +03:00
|
|
|
- export GO111MODULE=on
|
2018-11-29 04:18:21 +03:00
|
|
|
|
2018-10-11 11:31:05 +03:00
|
|
|
# Run unit tests with race condition detector.
|
2018-12-01 02:20:46 +03:00
|
|
|
- 'if [ "$RACE" = true ]; then make travis-race ; fi'
|
2018-10-11 11:31:05 +03:00
|
|
|
|
|
|
|
# Run integration tests.
|
2019-02-01 10:47:15 +03:00
|
|
|
- 'if [ "$ITEST" = true ]; then make travis-itest; fi'
|
2018-10-11 11:31:05 +03:00
|
|
|
|
|
|
|
# Run unit tests and generate coverage report.
|
2018-12-01 02:20:46 +03:00
|
|
|
- 'if [ "$COVER" = true ]; then make travis-cover; fi'
|
2018-10-11 11:31:05 +03:00
|
|
|
|
2017-10-18 01:42:22 +03:00
|
|
|
after_script:
|
2018-04-27 12:58:21 +03:00
|
|
|
- echo "Uploading to termbin.com..." && find *.log | xargs -I{} sh -c "cat {} | nc termbin.com 9999 | xargs -r0 printf '{} uploaded to %s'"
|
|
|
|
- echo "Uploading to file.io..." && tar -zcvO *.log | curl -s -F 'file=@-;filename=logs.tar.gz' https://file.io | xargs -r0 printf 'logs.tar.gz uploaded to %s\n'
|