You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
32 lines
594 B
32 lines
594 B
6 years ago
|
#!/usr/bin/env bash
|
||
|
|
||
6 years ago
|
set -e
|
||
|
set -u
|
||
|
set -o pipefail
|
||
|
|
||
6 years ago
|
npm run ganache:start -- -b 2 >> /dev/null 2>&1 &
|
||
6 years ago
|
npm_run_ganache_start_pid=$!
|
||
6 years ago
|
sleep 5
|
||
6 years ago
|
|
||
|
pushd "$(mktemp -d)"
|
||
|
npm install --no-package-lock truffle
|
||
|
truffle="$(npm bin)/truffle"
|
||
|
$truffle unbox drizzle
|
||
6 years ago
|
echo "Deploying contracts for Drizzle test..."
|
||
6 years ago
|
$truffle compile
|
||
|
$truffle migrate
|
||
|
|
||
6 years ago
|
BROWSER=none npm start >> /dev/null 2>&1 &
|
||
6 years ago
|
npm_start_pid=$!
|
||
|
|
||
|
popd
|
||
5 years ago
|
if ! mocha test/e2e/drizzle.spec
|
||
6 years ago
|
then
|
||
|
test_status=1
|
||
|
fi
|
||
|
|
||
|
! kill -15 $npm_run_ganache_start_pid
|
||
|
! kill -15 $npm_start_pid
|
||
|
! wait $npm_run_ganache_start_pid $npm_start_pid
|
||
|
exit ${test_status:-}
|