2017-01-25 17:39:01 +00:00
|
|
|
#!/usr/bin/env bash
|
|
|
|
|
|
2017-03-02 08:22:24 +00:00
|
|
|
set -u -e -o pipefail
|
2017-01-25 17:39:01 +00:00
|
|
|
|
|
|
|
|
# Setup environment
|
2017-03-05 09:49:10 +00:00
|
|
|
readonly thisDir=$(cd $(dirname $0); pwd)
|
|
|
|
|
source ${thisDir}/_travis-fold.sh
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
# run in subshell to avoid polluting cwd
|
|
|
|
|
(
|
|
|
|
|
cd ${PROJECT_ROOT}/aio
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
# Lint the code
|
|
|
|
|
travisFoldStart "test.aio.lint"
|
2017-03-31 23:24:25 +00:00
|
|
|
yarn lint
|
2017-03-05 09:49:10 +00:00
|
|
|
travisFoldEnd "test.aio.lint"
|
|
|
|
|
|
|
|
|
|
|
2017-10-10 09:22:57 +00:00
|
|
|
# Run PWA-score tests
|
|
|
|
|
# (Run before unit and e2e tests, which destroy the `dist/` directory.)
|
|
|
|
|
travisFoldStart "test.aio.pwaScore"
|
|
|
|
|
yarn test-pwa-score-localhost
|
|
|
|
|
travisFoldEnd "test.aio.pwaScore"
|
|
|
|
|
|
2018-05-10 12:38:45 +00:00
|
|
|
# Check the bundle sizes.
|
|
|
|
|
# (Run before unit and e2e tests, which destroy the `dist/` directory.)
|
|
|
|
|
travisFoldStart "test.aio.payload-size"
|
|
|
|
|
yarn payload-size
|
|
|
|
|
travisFoldEnd "test.aio.payload-size"
|
2017-10-10 09:22:57 +00:00
|
|
|
|
2017-03-05 09:49:10 +00:00
|
|
|
# Run unit tests
|
|
|
|
|
travisFoldStart "test.aio.unit"
|
2018-05-18 10:28:12 +00:00
|
|
|
yarn test --watch=false
|
2017-03-05 09:49:10 +00:00
|
|
|
travisFoldEnd "test.aio.unit"
|
|
|
|
|
|
2017-11-15 11:30:39 +00:00
|
|
|
# Run e2e tests
|
|
|
|
|
travisFoldStart "test.aio.e2e"
|
2018-04-13 18:21:17 +00:00
|
|
|
yarn e2e
|
2017-11-15 11:30:39 +00:00
|
|
|
travisFoldEnd "test.aio.e2e"
|
|
|
|
|
|
2018-04-15 20:46:17 +00:00
|
|
|
# Run unit tests for Firebase redirects
|
|
|
|
|
travisFoldStart "test.aio.redirects"
|
|
|
|
|
yarn redirects-test
|
|
|
|
|
travisFoldEnd "test.aio.redirects"
|
2017-11-15 11:30:39 +00:00
|
|
|
|
2017-03-01 22:39:37 +00:00
|
|
|
# Run unit tests for aio/aio-builds-setup
|
|
|
|
|
travisFoldStart "test.aio.aio-builds-setup"
|
2017-03-07 09:36:41 +00:00
|
|
|
./aio-builds-setup/scripts/test.sh
|
2017-03-01 22:39:37 +00:00
|
|
|
travisFoldEnd "test.aio.aio-builds-setup"
|
2017-03-05 09:49:10 +00:00
|
|
|
)
|