Skip to content
This repository has been archived by the owner on Oct 4, 2023. It is now read-only.

Commit

Permalink
make npm/yarn install more robust for unit/static tests
Browse files Browse the repository at this point in the history
  • Loading branch information
David Barth committed Feb 9, 2017
1 parent 91d6868 commit b9ed181
Show file tree
Hide file tree
Showing 3 changed files with 659 additions and 963 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@
"karma-phantomjs-shim": "^1.4.0",
"node-sass": "^4.1.1",
"node-ssh": "^4.0.1",
"phantomjs-prebuilt": "^2.1.8",
"phantomjs-prebuilt": "^2.1.13",
"postcss-bem-linter": "^0.6.0",
"reactify": "^1.1.1",
"ssh2": "^0.5.4",
Expand Down
14 changes: 9 additions & 5 deletions run-checks
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,15 @@ if [ ! -z "$STATIC_GO" ] || [ ! -z "$UNIT_GO" ]; then
sh ./get-go-deps.sh
fi

if [ ! -z "$STATIC_JS" ] || [ ! -z "$UNIT_JS" ]; then
set +e
yarn install
set -e
# twice, to cope with phantomjs postinstall issue
npm install phantomjs-prebuilt
export PHANTOMJS_BIN=`pwd`/node_modules/.bin/phantomjs
fi

if [ ! -z "$STATIC_GO" ]; then
# Run go static tests.

Expand Down Expand Up @@ -95,7 +104,6 @@ if [ ! -z "$STATIC_GO" ]; then
fi

if [ ! -z "$STATIC_JS" ]; then
yarn install
npm run js:lint
fi

Expand All @@ -117,10 +125,6 @@ if [ ! -z "$UNIT_GO" ]; then
fi

if [ ! -z "$UNIT_JS" ]; then
# www
echo Obtaining npm dependencies
yarn install

rm -rf .coverage-js

# js unit tests
Expand Down
Loading

0 comments on commit b9ed181

Please sign in to comment.