diff --git a/.travis.yml b/.travis.yml new file mode 100644 index 00000000000..0a4b0ea2e02 --- /dev/null +++ b/.travis.yml @@ -0,0 +1,26 @@ +sudo: false +language: node_js + +node_js: + - '4.2.3' + +addons: + firefox: "latest" + +install: + npm install -g angular-cli + +before_script: + # Necessary to run test on Travis CI that require a graphical interface. + # See https://docs.travis-ci.com/user/gui-and-headless-browsers + - "export DISPLAY=:99.0" + - "sh -e /etc/init.d/xvfb start" + +script: +- ./scripts/ci/build-and-test.sh ${MODE} + +cache: + directories: + - node_modules + - $HOME/.pub-cache + diff --git a/scripts/build-and-test.sh b/scripts/build-and-test.sh new file mode 100644 index 00000000000..2b166d63329 --- /dev/null +++ b/scripts/build-and-test.sh @@ -0,0 +1,11 @@ +#!/usr/bin/env bash +set -ex + +echo "======= Starting build-and-test.sh ========================================" + +# Go to project dir +SCRIPT_DIR=$(dirname $0) +cd ${SCRIPT_DIR}/../.. + +ng build +karma start ./karma.conf.js