.travis.yml 1.08 KB
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:
Marten Seemann's avatar
Marten Seemann committed
10 11 12 13
  - TRAVIS_GOARCH=amd64 BUILDMODE=gx
  - TRAVIS_GOARCH=386 BUILDMODE=gx
  - TRAVIS_GOARCH=amd64 BUILDMODE=gomod
  - TRAVIS_GOARCH=386 BUILDMODE=gomod
Marten Seemann's avatar
Marten Seemann committed
14 15 16 17

# 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
18 19 20 21 22 23 24 25 26
  - |
    if [ ${BUILDMODE} == "gx" ]; then
      make deps;
    fi
  - |
    if [ ${BUILDMODE} == "gomod" ]; then
      export GO111MODULE=on;
      make testutils;
    fi
Marten Seemann's avatar
Marten Seemann committed
27
  - export GOARCH=$TRAVIS_GOARCH
Marten Seemann's avatar
Marten Seemann committed
28
  - go env
Marten Seemann's avatar
Marten Seemann committed
29 30

script:
31
  # some tests are randomized. Run them a few times.
Marten Seemann's avatar
Marten Seemann committed
32
  - for i in `seq 1 10`; do
33 34
      ginkgo -r -v --cover --randomizeAllSpecs --randomizeSuites --trace --progress;
    done
Marten Seemann's avatar
Marten Seemann committed
35

Marten Seemann's avatar
Marten Seemann committed
36 37 38 39 40
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
41 42
cache:
  directories: