2020-06-04 15:46:22 +03:00
|
|
|
#!/bin/bash
|
|
|
|
# set -x
|
|
|
|
|
|
|
|
failed=0
|
2020-06-25 01:41:27 +03:00
|
|
|
go mod edit -replace github.com/micro/go-micro/v2=github.com/$2/v2@$1
|
2020-06-04 15:46:22 +03:00
|
|
|
# basic test, build the binary
|
2020-06-19 19:19:58 +03:00
|
|
|
go install
|
2020-06-04 15:46:22 +03:00
|
|
|
failed=$?
|
|
|
|
if [ $failed -gt 0 ]; then
|
|
|
|
exit $failed
|
|
|
|
fi
|
|
|
|
# unit tests
|
|
|
|
IN_TRAVIS_CI=yes go test -v ./...
|
2020-06-19 19:19:58 +03:00
|
|
|
|
|
|
|
./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
|