Skip to content

Commit

Permalink
WIP3
Browse files Browse the repository at this point in the history
  • Loading branch information
Mehdy Dara committed May 21, 2015
1 parent bbf3322 commit c132d07
Show file tree
Hide file tree
Showing 2 changed files with 29 additions and 6 deletions.
19 changes: 13 additions & 6 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
sudo: false

language: node_js

sudo: false
node_js:
- '0.10'
- '0.12'
Expand All @@ -10,19 +8,28 @@ node_js:
cache:
directories:
- node_modules
- test/tmp/deps/node_modules

matrix:
fast_finish: true
allow_failures:
- node_js: iojs

before_install:
install:
# Check the size of caches
- du -sh ./node_modules || true
# Disable the spinner, it looks bad on Travis
- npm config set spin false
# Log HTTP requests
- npm config set loglevel http
- npm install -g npm@latest
# Instal npm dependecies and ensure that npm cache is not stale
- scripts/npm/install-dependencies.sh

before_script:
- export CHROME_BIN=chromium-browser
- export DISPLAY=:99.0
- sh -e /etc/init.d/xvfb start
- gem install sass
- npm install -g npm@latest
- npm install -g bower
- npm install -g gulp
- npm install -g istanbul
Expand Down
16 changes: 16 additions & 0 deletions scripts/npm/install-dependencies.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
#!/bin/bash

set -e

SHRINKWRAP_FILE=npm-shrinkwrap.json
SHRINKWRAP_CACHED_FILE=node_modules/npm-shrinkwrap.cached.json

if diff -q $SHRINKWRAP_FILE $SHRINKWRAP_CACHED_FILE; then
echo 'No shrinkwrap changes detected. npm install will be skipped...';
else
echo 'Blowing away node_modules and reinstalling npm dependencies...'
rm -rf node_modules
npm install
cp $SHRINKWRAP_FILE $SHRINKWRAP_CACHED_FILE
echo 'npm install successful!'
fi

0 comments on commit c132d07

Please sign in to comment.