diff --git a/bin/post-test b/bin/post-test deleted file mode 100755 index 8b77be26..00000000 --- a/bin/post-test +++ /dev/null @@ -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 diff --git a/bin/pre-test b/bin/test similarity index 58% rename from bin/pre-test rename to bin/test index d2c1ff4a..91dc5924 100755 --- a/bin/pre-test +++ b/bin/test @@ -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 diff --git a/package.json b/package.json index 95a179d9..d878c8bd 100644 --- a/package.json +++ b/package.json @@ -55,9 +55,9 @@ }, "scripts": { "postpublish": "./bin/semantic-release.js post", - "posttest": "./bin/post-test", "prepublish": "./bin/semantic-release.js pre", - "pretest": "./bin/pre-test", - "test": "standard && node tests | tap-spec" + "test:style": "standard", + "test:integration": "node tests | tap-spec", + "test": "./bin/test" } }