2016-06-09 00:12:13 +02:00
|
|
|
language: go
|
2018-10-11 10:31:05 +02:00
|
|
|
cache:
|
|
|
|
directories:
|
|
|
|
- $GOCACHE
|
2018-11-29 02:18:21 +01:00
|
|
|
- $GOPATH/pkg/mod
|
2018-10-11 10:31:05 +02:00
|
|
|
- $GOPATH/src/github.com/btcsuite
|
|
|
|
- $GOPATH/src/github.com/golang
|
|
|
|
- $GOPATH/src/gopkg.in/alecthomas
|
|
|
|
|
2018-11-16 11:08:16 +01:00
|
|
|
go:
|
|
|
|
- "1.11.x"
|
|
|
|
|
|
|
|
env:
|
2018-10-11 10:31:05 +02:00
|
|
|
global:
|
|
|
|
- GOCACHE=$HOME/.go-build
|
2018-11-16 11:08:16 +01:00
|
|
|
matrix:
|
2018-11-30 06:27:49 +01:00
|
|
|
- RACE=true
|
2018-11-16 11:08:16 +01:00
|
|
|
- ITEST=true
|
2018-11-30 06:27:49 +01:00
|
|
|
- COVER=true
|
2018-10-11 10:31:05 +02:00
|
|
|
|
2018-01-17 17:07:31 +01:00
|
|
|
sudo: required
|
2016-07-26 01:39:22 +02:00
|
|
|
install:
|
2018-01-17 17:07:31 +01:00
|
|
|
- sudo add-apt-repository -y ppa:bitcoin/bitcoin -y
|
|
|
|
- sudo apt-get update -q
|
|
|
|
- sudo apt-get install bitcoind -y
|
2017-06-21 16:12:53 +02:00
|
|
|
- export PATH=$PATH:$PWD/linux-amd64/
|
2018-10-11 10:31:05 +02:00
|
|
|
|
2016-07-26 01:39:22 +02:00
|
|
|
script:
|
2018-11-30 06:40:47 +01:00
|
|
|
- export GO111MODULE=on
|
2018-11-29 02:18:21 +01:00
|
|
|
|
2018-10-11 10:31:05 +02:00
|
|
|
# Run unit tests with race condition detector.
|
2018-12-01 00:20:46 +01:00
|
|
|
- 'if [ "$RACE" = true ]; then make travis-race ; fi'
|
2018-10-11 10:31:05 +02:00
|
|
|
|
|
|
|
# Run integration tests.
|
2019-02-01 08:47:15 +01:00
|
|
|
- 'if [ "$ITEST" = true ]; then make travis-itest; fi'
|
2018-10-11 10:31:05 +02:00
|
|
|
|
|
|
|
# Run unit tests and generate coverage report.
|
2018-12-01 00:20:46 +01:00
|
|
|
- 'if [ "$COVER" = true ]; then make travis-cover; fi'
|
2018-10-11 10:31:05 +02:00
|
|
|
|
2017-10-18 00:42:22 +02:00
|
|
|
after_script:
|
2018-04-27 11:58:21 +02: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'
|