Skip to content

Commit

Permalink
fix: travis test setup
Browse files Browse the repository at this point in the history
  • Loading branch information
gr2m committed Feb 26, 2015
1 parent 8e20936 commit 3b07850
Showing 1 changed file with 25 additions and 7 deletions.
32 changes: 25 additions & 7 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,30 +1,45 @@
language: node_js

node_js:
- "0.10"

cache:
directories:
- node_modules

before_script:
- "export DISPLAY=:99.0"
- "sh -e /etc/init.d/xvfb start"
- "sleep 5"
- curl -Lo travis_after_all.py https://raw.github.com/dmakhno/travis_after_all/master/travis_after_all.py
- curl -o travis_after_all.py https://raw.github.com/dmakhno/travis_after_all/master/travis_after_all.py

after_success:
- python travis_after_all.py
- export $(cat .to_export_back)
- |
if [ "$BUILD_LEADER" = "YES" ]; then
if [ "$BUILD_AGGREGATE_STATUS" = "others_succeeded" ]; then
echo "All Succeded! PUBLISHING..."
else
echo "Some Failed"
fi
fi
after_failure:
- python travis_after_all.py
- export $(cat .to_export_back)
- |
if [ "$BUILD_LEADER" = "YES" ]; then
if [ "$BUILD_AGGREGATE_STATUS" = "others_failed" ]; then
echo "All Failed"
else
echo "Some Failed"
fi
fi
before_deploy:
- rm -f travis_after_all.py .to_export_back
after_script:
- echo leader=$BUILD_LEADER status=$BUILD_AGGREGATE_STATUS

script: npm run test

cache:
directories:
- node_modules

notifications:
email: false

Expand Down Expand Up @@ -56,3 +71,6 @@ deploy:
on:
branch: master
repo: gr2m/appcache-nanny
condition: "$BUILD_LEADER$BUILD_AGGREGATE_STATUS = YESothers_succeeded"

sudo: false

0 comments on commit 3b07850

Please sign in to comment.