#!/bin/sh

# script/cibuild: Setup environment for CI to run tests. This is primarily
#                 designed to run on the continuous integration server.

set -e

cd "$(dirname "$0")/.."

echo "Tests started at..."
date "+%H:%M:%S"

# setup environment
export NODE_ENV="test"

test -d "/usr/share/nodenv/shims" && {
  export PATH=/usr/share/nodenv/shims:$PATH
}

# run tests
echo "Running tests ..."
date "+%H:%M:%S"

# run tests.
script/test

