chore: make test command cleanup after itself and fail early for style errors
This commit is contained in:
@@ -1,9 +0,0 @@
|
||||
#!/bin/sh
|
||||
|
||||
cat .tmp/sinopia.pid | xargs kill
|
||||
|
||||
cat .tmp/ghrs.pid | xargs kill
|
||||
|
||||
cp .tmp/.npmrc ~/.npmrc
|
||||
|
||||
rm -rf .tmp
|
||||
+19
-1
@@ -1,7 +1,23 @@
|
||||
#!/bin/sh
|
||||
#!/bin/bash
|
||||
|
||||
set -e
|
||||
|
||||
npm run test:style
|
||||
|
||||
function cleanup {
|
||||
set +e
|
||||
|
||||
cp .tmp/.npmrc ~/.npmrc
|
||||
|
||||
cat .tmp/sinopia.pid | xargs kill
|
||||
|
||||
cat .tmp/ghrs.pid | xargs kill
|
||||
|
||||
rm -rf .tmp
|
||||
}
|
||||
|
||||
trap cleanup EXIT
|
||||
|
||||
[ -d ".tmp" ] && ./bin/post-test
|
||||
|
||||
mkdir -p .tmp/modules
|
||||
@@ -16,3 +32,5 @@ sleep 0.5
|
||||
cp ~/.npmrc .tmp/.npmrc
|
||||
|
||||
cp tests/.npmrc ~/.npmrc
|
||||
|
||||
npm run test:integration
|
||||
Reference in New Issue
Block a user