Build against micro and examples on pull requests (#1724)

* Build against micro and examples on pull requests
This commit is contained in:
Dominic Wong
2020-06-19 17:19:58 +01:00
committed by GitHub
parent 87543b2c8a
commit 695cc9d526
3 changed files with 14 additions and 9 deletions

View File

@@ -4,11 +4,16 @@
failed=0
go mod edit -replace github.com/micro/go-micro/v2=github.com/micro/go-micro/v2@$1
# basic test, build the binary
go build
go install
failed=$?
if [ $failed -gt 0 ]; then
exit $failed
fi
# unit tests
IN_TRAVIS_CI=yes go test -v ./...
# TODO integration tests
./scripts/test-docker.sh
# Generate keys for JWT tests
ssh-keygen -f /tmp/sshkey -m pkcs8 -q -N ""
ssh-keygen -f /tmp/sshkey -e -m pkcs8 > /tmp/sshkey.pub
go clean -testcache && IN_TRAVIS_CI=yes go test --tags=integration -v ./test