language: go go: - "1.12.x" # 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: - TRAVIS_GOARCH=amd64 BUILDMODE=gx - TRAVIS_GOARCH=386 BUILDMODE=gx - TRAVIS_GOARCH=amd64 BUILDMODE=gomod - TRAVIS_GOARCH=386 BUILDMODE=gomod # second part of the GOARCH workaround # now actually set the GOARCH env variable to the value of the temporary variable set earlier before_install: - | if [ ${BUILDMODE} == "gx" ]; then make deps; fi - | if [ ${BUILDMODE} == "gomod" ]; then export GO111MODULE=on; make testutils; fi - export GOARCH=$TRAVIS_GOARCH - go env script: # some tests are randomized. Run them a few times. - for i in `seq 1 3`; do ginkgo -r -v --cover --randomizeAllSpecs --randomizeSuites --trace --progress; done after_success: - cat go-libp2p-tls.coverprofile > coverage.txt - cat */*.coverprofile >> coverage.txt - bash <(curl -s https://codecov.io/bash) -f coverage.txt cache: directories: - $GOPATH/src/gx