commonplace/.travis.yml

49 строки
1.5 KiB
YAML

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"
- "mv test/ tmpsrc/test/"
- "cd tmpsrc"
# Create an installation.
- "../bin/commonplace install"
# Lint the installation.
- "../bin/commonplace lint"
# Start the damper.
- "nohup ../bin/damper &"
# Run the unit tests.
- "DISPLAY=:99.0 ../casperjs/bin/casperjs test test/"
# Generate include files.
- "../bin/commonplace includes"
# TODO: Test that the includes are there.
# Delete the include files.
- "../bin/commonplace clean"
# TODO: Test that the includes are gone.
# 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"
# Make sure `commonplace init` did what it was supposed to do.
- "DISPLAY=:99.0 ../casperjs/bin/casperjs test test/"