0xDeCA10B/demo/client/test.sh

27 строки
532 B
Bash
Исходник Обычный вид История

2019-05-24 19:00:36 +03:00
#!/bin/bash
# Enable job control with -m so that the blockchain can be killed.
set -emx
pushd ..
yarn blockchain & bc_pid=$!
sleep 1s
popd
cleanup() {
kill -9 -${bc_pid}
if [ "$1" == "exit" ]; then
exit 1
fi
}
# The `set -e` at the top doesn't seem to help with getting these exit on failure.
truffle compile || cleanup exit
CI=true truffle migrate || cleanup exit
CI=true truffle test || cleanup exit
cleanup
# Set `CI=true` to avoid watching for changes.
CI=true react-scripts test --env=jsdom || exit 1