add test script for testing

Signed-off-by: Corbin Halliwill <challiwill@pivotal.io>
This commit is contained in:
Chris Brown
2015-10-19 14:47:21 -07:00
committed by Corbin Halliwill
parent 46361082cf
commit df4c9d8ccf
3 changed files with 31 additions and 13 deletions

18
scripts/ci Executable file
View File

@@ -0,0 +1,18 @@
#!/bin/bash
# vim: set ft=sh
set -eu
export GOPATH=$PWD/gopath
export PATH=$GOPATH/bin:$PATH
cd $GOPATH/src/github.com/concourse/github-release-resource
export GOPATH=${PWD}/Godeps/_workspace:$GOPATH
export PATH=${PWD}/Godeps/_workspace/bin:$PATH
go install github.com/onsi/ginkgo/ginkgo
CGO_ENABLED=1 ginkgo -race -r -p "$@"
./scripts/build

View File

@@ -1,18 +1,18 @@
#!/bin/bash
# vim: set ft=sh
set -eu
set -e
export GOPATH=$PWD/gopath
export PATH=$GOPATH/bin:$PATH
not_installed() {
! command -v $1 > /dev/null 2>&1
}
cd $GOPATH/src/github.com/concourse/github-release-resource
github_release_resource_dir=$(realpath $(dirname $(dirname $0)))
export GOPATH=${PWD}/Godeps/_workspace:$GOPATH
export PATH=${PWD}/Godeps/_workspace/bin:$PATH
if not_installed ginkgo; then
echo "# ginkgo is not installed! run the following command:"
echo " go install github.com/onsi/ginkgo/ginkgo"
exit 1
fi
go install github.com/onsi/ginkgo/ginkgo
CGO_ENABLED=1 ginkgo -race -r -p "$@"
./scripts/build
cd $github_release_resource_dir
ginkgo -r -p