Skip to content
This repository has been archived by the owner on May 26, 2022. It is now read-only.

Commit

Permalink
run tests with and without gx on CI
Browse files Browse the repository at this point in the history
  • Loading branch information
marten-seemann committed Jan 9, 2019
1 parent befa956 commit 4754cf2
Showing 1 changed file with 15 additions and 6 deletions.
21 changes: 15 additions & 6 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,15 +8,24 @@ go:
# 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
- TRAVIS_GOARCH=386
- TRAVIS_GOARCH=amd64 GX=true
- TRAVIS_GOARCH=amd64 GX=false
- TRAVIS_GOARCH=386 GX=true
- TRAVIS_GOARCH=386 GX=false

# second part of the GOARCH workaround
# now actually set the GOARCH env variable to the value of the temporary variable set earlier
before_install:
- make deps
- export GOARCH=$TRAVIS_GOARCH
- go env # for debugging
- if [ $GX == "true" ]; then
echo "using gx";
make deps;
else
echo "not using gx";
make testutils;
go get -u -t ./...;
fi
# second part of the GOARCH workaround
# now actually set the GOARCH env variable to the value of the temporary variable set earlier
- export GOARCH=$TRAVIS_GOARCH

# see https://github.com/travis-ci/travis-ci/issues/8361#issuecomment-350090030
before_script:
Expand Down

0 comments on commit 4754cf2

Please sign in to comment.