commonplace/.travis.yml

52 строки
1.7 KiB
YAML
Исходник Обычный вид История

2013-12-09 21:02:50 +04:00
branches:
only:
- master
notifications:
irc:
channels:
- "irc.mozilla.org#amo-bots"
on_success: change
on_failure: change
email: false
language: node_js
node_js:
- "0.10"
before_script:
- "export PHANTOMJS_EXECUTABLE='phantomjs --local-to-remote-url-access=yes --ignore-ssl-errors=yes'"
- "export DISPLAY=:99.0"
- "sh -e /etc/init.d/xvfb start"
- "npm install"
- "git clone git://github.com/n1k0/casperjs.git casperjs"
- "cd casperjs && git checkout 1.0.2 && cd .." # Use Homebrew's version of casper
script:
- "mkdir tmpsrc"
2013-12-09 23:01:32 +04:00
- "mv test/ tmpsrc/test/"
2013-12-09 21:02:50 +04:00
- "cd tmpsrc"
2013-12-09 22:57:42 +04:00
# Create an installation.
2013-12-09 21:02:50 +04:00
- "../bin/commonplace install"
2013-12-09 22:57:42 +04:00
# Lint the installation.
2013-12-09 21:02:50 +04:00
- "../bin/commonplace lint"
2013-12-09 22:57:42 +04:00
# Start the damper.
- "nohup ../bin/damper &"
# Run the unit tests.
2013-12-09 23:00:59 +04:00
- "DISPLAY=:99.0 ../casperjs/bin/casperjs test test/"
# Generate include files and test that they are there.
2013-12-09 21:02:50 +04:00
- "../bin/commonplace includes"
- "test -f src/media/js/include.js"
# - "test -f src/media/css/include.css" # Commented because there is no CSS to generate.
# Delete the include files and test that they are gone.
2013-12-09 22:57:42 +04:00
- "../bin/commonplace clean"
- "test ! -f src/media/js/include.js"
# - "test ! -f src/media/css/include.css" # Commented because there is no CSS to remove.
2013-12-09 22:57:42 +04:00
# Delete a bunch of critical distributable files. Doesn't need to be exhaustive.
- "rm src/media/js/main.js"
- "rm src/media/js/rewriters.js"
- "rm src/media/js/routes.js"
- "rm src/media/js/routes_api.js"
- "rm src/media/js/routes_api_args.js"
# Recreate the files; test `commonplace init`.
- "../bin/commonplace init"
- "../bin/commonplace compile"
2013-12-09 22:57:42 +04:00
# Make sure `commonplace init` did what it was supposed to do.
2013-12-09 23:00:59 +04:00
- "DISPLAY=:99.0 ../casperjs/bin/casperjs test test/"