File tree 1 file changed +24
-9
lines changed
1 file changed +24
-9
lines changed Original file line number Diff line number Diff line change 1
1
#! /usr/bin/env bash
2
2
3
- export PATH=" $PATH :./node_modules/.bin"
3
+ set -e
4
+ set -u
5
+ set -o pipefail
4
6
5
7
npm run ganache:start -- -b 2 >> /dev/null 2>&1 &
8
+ npm_run_ganache_start_pid=$!
6
9
sleep 5
7
- cd test/e2e/beta/
8
- rm -rf drizzle-test
9
- mkdir drizzle-test && cd drizzle-test
10
- npm install truffle
11
- ../../../../node_modules/.bin/ truffle unbox drizzle
10
+
11
+ pushd " $( mktemp -d ) "
12
+ npm install --no-package-lock truffle
13
+ truffle= " $( npm bin ) / truffle"
14
+ $ truffle unbox drizzle
12
15
echo " Deploying contracts for Drizzle test..."
13
- ../../../../node_modules/.bin/truffle compile && ../../../../node_modules/.bin/truffle migrate
16
+ $truffle compile
17
+ $truffle migrate
18
+
14
19
BROWSER=none npm start >> /dev/null 2>&1 &
15
- cd ../../../../
16
- mocha test/e2e/beta/drizzle.spec
20
+ npm_start_pid=$!
21
+
22
+ popd
23
+ if ! mocha test/e2e/beta/drizzle.spec
24
+ then
25
+ test_status=1
26
+ fi
27
+
28
+ ! kill -15 $npm_run_ganache_start_pid
29
+ ! kill -15 $npm_start_pid
30
+ ! wait $npm_run_ganache_start_pid $npm_start_pid
31
+ exit ${test_status:- }
You can’t perform that action at this time.
0 commit comments