add test script for testing
Signed-off-by: Corbin Halliwill <challiwill@pivotal.io>
This commit is contained in:
committed by
Corbin Halliwill
parent
46361082cf
commit
df4c9d8ccf
@@ -7,4 +7,4 @@ inputs:
|
|||||||
path: gopath/src/github.com/concourse/github-release-resource
|
path: gopath/src/github.com/concourse/github-release-resource
|
||||||
|
|
||||||
run:
|
run:
|
||||||
path: gopath/src/github.com/concourse/github-release-resource/scripts/test
|
path: gopath/src/github.com/concourse/github-release-resource/scripts/ci
|
||||||
|
18
scripts/ci
Executable file
18
scripts/ci
Executable 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
|
24
scripts/test
24
scripts/test
@@ -1,18 +1,18 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
# vim: set ft=sh
|
|
||||||
|
|
||||||
set -eu
|
set -e
|
||||||
|
|
||||||
export GOPATH=$PWD/gopath
|
not_installed() {
|
||||||
export PATH=$GOPATH/bin:$PATH
|
! 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
|
if not_installed ginkgo; then
|
||||||
export PATH=${PWD}/Godeps/_workspace/bin:$PATH
|
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
|
cd $github_release_resource_dir
|
||||||
|
ginkgo -r -p
|
||||||
CGO_ENABLED=1 ginkgo -race -r -p "$@"
|
|
||||||
|
|
||||||
./scripts/build
|
|
||||||
|
Reference in New Issue
Block a user