1
0
mirror of https://github.com/matrix-org/matrix-react-sdk.git synced 2025-07-28 15:22:05 +03:00

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

11
scripts/travis/install-deps.sh Executable file
View File

@ -0,0 +1,11 @@
#!/bin/sh
set -ex
scripts/fetchdep.sh matrix-org matrix-js-sdk
rm -r node_modules/matrix-js-sdk || true
ln -s ../matrix-js-sdk node_modules/matrix-js-sdk
cd matrix-js-sdk
npm install
cd ..

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