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/"
|
2013-12-10 04:21:56 +04:00
|
|
|
# Generate include files and test that they are there.
|
2013-12-09 21:02:50 +04:00
|
|
|
- "../bin/commonplace includes"
|
2013-12-10 04:21:56 +04:00
|
|
|
- "test -f src/media/js/include.js"
|
2013-12-10 04:46:19 +04:00
|
|
|
# - "test -f src/media/css/include.css" # Commented because there is no CSS to generate.
|
2013-12-10 04:21:56 +04:00
|
|
|
# Delete the include files and test that they are gone.
|
2013-12-09 22:57:42 +04:00
|
|
|
- "../bin/commonplace clean"
|
2013-12-10 04:21:56 +04:00
|
|
|
- "test ! -f src/media/js/include.js"
|
2013-12-10 04:46:19 +04:00
|
|
|
# - "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"
|
2013-12-10 04:46:19 +04:00
|
|
|
- "../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/"
|