Skip to content

Commit

Permalink
hook integration tests into travis
Browse files Browse the repository at this point in the history
  • Loading branch information
alexflint committed Dec 27, 2018
1 parent e5a1f3c commit f8987d1
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 3 deletions.
3 changes: 3 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,3 +11,6 @@ before_install:
- if ! go get github.com/golang/tools/cmd/cover; then go get golang.org/x/tools/cmd/cover; fi
script:
- $HOME/gopath/bin/goveralls -service=travis-ci
- bash test/compile_with_go110.sh
- bash test/compile_with_go111.sh
- bash test/compile_with_go111_inside_gopath.sh
4 changes: 3 additions & 1 deletion test/compile_with_go110.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,11 @@
# under go 1.10, which was the last release before introduction of the new go
# module system.

DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )"

docker run \
--rm \
-v $(pwd)/some-program:/src \
-v $DIR/some-program:/src \
-w /src \
golang:1.10 \
bash -c "go get github.com/alexflint/go-arg && go build -o /dev/null"
4 changes: 3 additions & 1 deletion test/compile_with_go111.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,11 @@
# This test checks that we can compile some code that depends on go-arg when using go 1.11
# with the new go module system active.

DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )"

docker run \
--rm \
-v $(pwd)/some-program:/src \
-v $DIR/some-program:/src \
-w /src \
golang:1.11 \
go build -o /dev/null
4 changes: 3 additions & 1 deletion test/compile_with_go111_inside_gopath.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,11 @@
# This test checks that we can correctly "go get" and then use the go-arg package using
# go 1.11 when the code is within the GOPATH (in which case modules are disabled by default).

DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )"

docker run \
--rm \
-v $(pwd)/some-program:/go/src/some-program \
-v $DIR/some-program:/go/src/some-program \
-w /go/src/some-program \
golang:1.11 \
bash -c "go get github.com/alexflint/go-arg && go build -o /dev/null"

0 comments on commit f8987d1

Please sign in to comment.