.travis.yml 980 Bytes
Newer Older
Marten Seemann's avatar
Marten Seemann committed
1 2 3
language: go

go:
Marten Seemann's avatar
Marten Seemann committed
4
  - "1.12.x"
Marten Seemann's avatar
Marten Seemann committed
5 6 7 8 9

# first part of the GOARCH workaround
# setting the GOARCH directly doesn't work, since the value will be overwritten later
# so set it to a temporary environment variable first
env:
Raúl Kripalani's avatar
Raúl Kripalani committed
10 11
  - TRAVIS_GOARCH=amd64
  - TRAVIS_GOARCH=386
Marten Seemann's avatar
Marten Seemann committed
12 13 14 15

# second part of the GOARCH workaround
# now actually set the GOARCH env variable to the value of the temporary variable set earlier
before_install:
Marten Seemann's avatar
Marten Seemann committed
16
  - |
Raúl Kripalani's avatar
Raúl Kripalani committed
17 18 19 20
    export GO111MODULE=on;
    go get golang.org/x/tools/cmd/cover;
    go get github.com/onsi/ginkgo/ginkgo;
    go get github.com/onsi/gomega;
Marten Seemann's avatar
Marten Seemann committed
21
  - export GOARCH=$TRAVIS_GOARCH
Marten Seemann's avatar
Marten Seemann committed
22
  - go env
Marten Seemann's avatar
Marten Seemann committed
23 24

script:
25
  # some tests are randomized. Run them a few times.
Marten Seemann's avatar
Marten Seemann committed
26
  - for i in `seq 1 10`; do
27 28
      ginkgo -r -v --cover --randomizeAllSpecs --randomizeSuites --trace --progress;
    done
Marten Seemann's avatar
Marten Seemann committed
29

Marten Seemann's avatar
Marten Seemann committed
30 31 32 33 34
after_success:
  - cat go-libp2p-tls.coverprofile > coverage.txt
  - cat */*.coverprofile >> coverage.txt
  - bash <(curl -s https://codecov.io/bash) -f coverage.txt

Marten Seemann's avatar
Marten Seemann committed
35 36
cache:
  directories: