forked from euphoria-io/heim
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtest.sh
More file actions
executable file
·38 lines (31 loc) · 806 Bytes
/
test.sh
File metadata and controls
executable file
·38 lines (31 loc) · 806 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
#!/bin/bash
set -ex
# pwd is gopath/src/euphoria-io/heim
export HEIM_GOPATH=$(pwd)/../../..
setup_deps() {
git submodule update --init
# required for running gulp out of this directory.
ln -s $(pwd)/_deps/node_modules ./node_modules
export PATH=${PATH}:$(pwd)/node_modules/.bin:$(pwd)/_deps/godeps/bin:${HEIM_GOPATH}/bin
export GOPATH=${HEIM_GOPATH}:$(pwd)/_deps/godeps
}
test_backend() {
psql -V
psql -c 'create database heimtest;' -U postgres -h $DB_HOST
export DSN="postgres://postgres@$DB_HOST/heimtest?sslmode=disable"
go install github.com/coreos/etcd
go test -v euphoria.io/heim/...
}
test_client() {
export NODE_ENV=development
pushd ./client
eslint ./
mochify
popd
}
setup_deps
test_client
test_backend
if [ "$1" == "build" ]; then
$(dirname $0)/build.sh
fi