2017-01-25 12:39:01 -05:00
|
|
|
#!/usr/bin/env bash
|
|
|
|
|
|
|
|
set -ex -o pipefail
|
|
|
|
|
|
|
|
if [[ ${TRAVIS} && ${CI_MODE} != "aio" ]]; then
|
|
|
|
exit 0;
|
|
|
|
fi
|
|
|
|
|
|
|
|
|
|
|
|
echo 'travis_fold:start:test.aio'
|
|
|
|
|
|
|
|
# Setup environment
|
|
|
|
cd `dirname $0`
|
|
|
|
source ./env.sh
|
|
|
|
|
|
|
|
|
|
|
|
echo 'travis_fold:start:test.aio.lint'
|
|
|
|
# Lint the code
|
2017-02-09 14:58:36 -05:00
|
|
|
cd ../../aio
|
2017-01-25 12:39:01 -05:00
|
|
|
yarn run lint
|
|
|
|
cd -
|
|
|
|
echo 'travis_fold:end:test.aio.lint'
|
|
|
|
|
|
|
|
|
2017-02-09 14:58:36 -05:00
|
|
|
echo 'travis_fold:start:test.aio.doc-gen'
|
|
|
|
# Lint the code
|
|
|
|
cd ../../aio
|
|
|
|
$(npm bin)/gulp docs
|
|
|
|
cd -
|
|
|
|
echo 'travis_fold:end:test.aio.doc-gen'
|
|
|
|
|
|
|
|
|
2017-01-25 12:39:01 -05:00
|
|
|
echo 'travis_fold:start:test.aio.localChromeSetup'
|
|
|
|
|
|
|
|
# Start local Chrome
|
|
|
|
if [[ ${TRAVIS} ]]; then
|
|
|
|
sh -e /etc/init.d/xvfb start
|
|
|
|
fi
|
|
|
|
|
|
|
|
echo 'travis_fold:end:test.aio.localChromeSetup'
|
|
|
|
|
|
|
|
|
|
|
|
echo 'travis_fold:start:test.aio.unit'
|
|
|
|
# Run unit tests
|
2017-02-09 14:58:36 -05:00
|
|
|
cd ../../aio
|
2017-01-25 12:39:01 -05:00
|
|
|
yarn test -- --single-run
|
|
|
|
cd -
|
|
|
|
echo 'travis_fold:end:test.aio.unit'
|
|
|
|
|
2017-02-01 00:59:37 -05:00
|
|
|
echo 'travis_fold:start:test.aio.e2e'
|
|
|
|
# Run e2e tests
|
2017-02-09 14:58:36 -05:00
|
|
|
cd ../../aio
|
2017-02-01 00:59:37 -05:00
|
|
|
yarn run e2e
|
|
|
|
cd -
|
|
|
|
echo 'travis_fold:end:test.aio.e2e'
|
2017-01-25 12:39:01 -05:00
|
|
|
|
|
|
|
echo 'travis_fold:end:test.aio'
|