language: go
cache:
  directories:
    - $GOCACHE
    - $GOPATH/pkg/mod
    - $GOPATH/src/github.com/btcsuite
    - $GOPATH/src/github.com/golang
    - $GOPATH/src/gopkg.in/alecthomas
go:
  - "1.13.x"
sudo: false
install:
  - export PATH=$PATH:$PWD/linux-amd64/
  - mkdir -p $GOPATH/src/github.com/btcsuite/
  - "[ -d $GOPATH/src/github.com/btcsuite/btcd ] || git clone https://github.com/btcsuite/btcd.git $GOPATH/src/github.com/btcsuite/btcd"
  - pushd $GOPATH/src/github.com/btcsuite/btcd
  - $GOPATH/src/github.com/lightninglabs/neutrino/btcd_checkout.sh
  - go install . ./cmd/...
  - popd
env:
  matrix:
    - RACE=false
    - RACE=true
script:
  - export GO111MODULE=on
  - export PATH=$PATH:$GOPATH/bin
  - ./gotest.sh
