split up script for unit and end-to-end tests so unit tests are not run as part of e2e tests

pull/21833/head
Bruno Windels 2019-01-09 14:21:45 +01:00
parent ba5e3f86cb
commit 5ce08523f8
4 changed files with 36 additions and 21 deletions

View File

@ -14,9 +14,7 @@ node_js:
addons:
chrome: stable
install:
- npm install
- ./scripts/travis/install-deps.sh
matrix:
include:
- name: Linting Checks
@ -25,12 +23,9 @@ matrix:
- npm run lintwithexclusions
- name: End-to-End Tests
install:
- npm install
- ./scripts/travis/install-deps.sh
- sudo apt-get install build-essential python2.7-dev libffi-dev python-pip python-setuptools sqlite3 libssl-dev python-virtualenv libjpeg-dev libxslt1-dev
script:
- ./scripts/travis/test-riot.sh
- ./scripts/travis/end-to-end-tests.sh
- name: Unit Tests
script:
- npm run test
- ./scripts/travis/unit-tests.sh

14
scripts/travis/test-riot.sh → scripts/travis/build.sh Executable file → Normal file
View File

@ -24,18 +24,4 @@ rm -r node_modules/matrix-react-sdk
ln -s "$REACT_SDK_DIR" node_modules/matrix-react-sdk
npm run build
npm run test
popd
if [ "$TRAVIS_BRANCH" = "develop" ]
then
# run end to end tests
scripts/fetchdep.sh matrix-org matrix-react-end-to-end-tests master
pushd matrix-react-end-to-end-tests
ln -s $REACT_SDK_DIR/$RIOT_WEB_DIR riot/riot-web
# PUPPETEER_SKIP_CHROMIUM_DOWNLOAD=true ./install.sh
# CHROME_PATH=$(which google-chrome-stable) ./run.sh
./install.sh
./run.sh --travis
popd
fi

View File

@ -0,0 +1,24 @@
#!/bin/bash
#
# script which is run by the travis build (after `npm run test`).
#
# clones riot-web develop and runs the tests against our version of react-sdk.
set -ev
RIOT_WEB_DIR=riot-web
REACT_SDK_DIR=`pwd`
if [ "$TRAVIS_BRANCH" = "develop" ]
then
scripts/travis/build.sh
# run end to end tests
scripts/fetchdep.sh matrix-org matrix-react-end-to-end-tests master
pushd matrix-react-end-to-end-tests
ln -s $REACT_SDK_DIR/$RIOT_WEB_DIR riot/riot-web
# PUPPETEER_SKIP_CHROMIUM_DOWNLOAD=true ./install.sh
# CHROME_PATH=$(which google-chrome-stable) ./run.sh
./install.sh
./run.sh --travis
popd
fi

View File

@ -0,0 +1,10 @@
#!/bin/bash
#
# script which is run by the travis build (after `npm run test`).
#
# clones riot-web develop and runs the tests against our version of react-sdk.
set -ev
scripts/travis/build.sh
npm run test