Refactor travis-ci to use parallel jobs

This commit is contained in:
Erik Johnston 2019-01-08 11:21:19 +00:00
parent 5fb6da886c
commit ab468b5346
3 changed files with 19 additions and 8 deletions

View file

@ -9,9 +9,3 @@ ln -s ../matrix-js-sdk node_modules/matrix-js-sdk
cd matrix-js-sdk
npm install
cd ..
npm run test
./.travis-test-riot.sh
# run the linter, but exclude any files known to have errors or warnings.
npm run lintwithexclusions

41
scripts/travis/test-riot.sh Executable file
View file

@ -0,0 +1,41 @@
#!/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`
scripts/fetchdep.sh vector-im riot-web
pushd "$RIOT_WEB_DIR"
mkdir node_modules
npm install
# use the version of js-sdk we just used in the react-sdk tests
rm -r node_modules/matrix-js-sdk
ln -s "$REACT_SDK_DIR/node_modules/matrix-js-sdk" node_modules/matrix-js-sdk
# ... and, of course, the version of react-sdk we just built
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