From 1b6735d7292e7e0ee6a4331f687818b1f5fb4506 Mon Sep 17 00:00:00 2001 From: Richard van der Hoff Date: Thu, 19 Jan 2017 12:51:20 +0000 Subject: [PATCH 1/4] Configure travis to test riot-web after building --- .travis-test-riot.sh | 15 +++++++++++++++ .travis.yml | 3 +++ 2 files changed, 18 insertions(+) create mode 100755 .travis-test-riot.sh diff --git a/.travis-test-riot.sh b/.travis-test-riot.sh new file mode 100755 index 0000000000..b488045df1 --- /dev/null +++ b/.travis-test-riot.sh @@ -0,0 +1,15 @@ +#!/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 + +git clone --depth=1 https://github.com/vector-im/riot-web.git riot-web +cd riot-web +mkdir node_modules +ln -s ../.. node_modules/matrix-react-sdk +npm install +(cd node_modules/matrix-js-sdk && npm install) +npm run test diff --git a/.travis.yml b/.travis.yml index 6d68b66a1c..9a8f804644 100644 --- a/.travis.yml +++ b/.travis.yml @@ -4,3 +4,6 @@ node_js: install: - npm install - (cd node_modules/matrix-js-sdk && npm install) +script: + - npm run test + - ./.travis-test-riot.sh From dee3495d51b850f7765da766cc063f52284f0c1d Mon Sep 17 00:00:00 2001 From: Richard van der Hoff Date: Thu, 19 Jan 2017 17:21:03 +0000 Subject: [PATCH 2/4] Run riot-web develop, not master --- .travis-test-riot.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis-test-riot.sh b/.travis-test-riot.sh index b488045df1..c483ea7b4e 100755 --- a/.travis-test-riot.sh +++ b/.travis-test-riot.sh @@ -6,7 +6,7 @@ set -ev -git clone --depth=1 https://github.com/vector-im/riot-web.git riot-web +git clone --depth=1 --branch develop https://github.com/vector-im/riot-web.git riot-web cd riot-web mkdir node_modules ln -s ../.. node_modules/matrix-react-sdk From af4ef1da8bb99e1b4cb2ac0cd22bac39351b2ce9 Mon Sep 17 00:00:00 2001 From: Richard van der Hoff Date: Thu, 19 Jan 2017 17:41:58 +0000 Subject: [PATCH 3/4] Install source-map-loader before building riot-web --- .travis-test-riot.sh | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/.travis-test-riot.sh b/.travis-test-riot.sh index c483ea7b4e..482b4a21c1 100755 --- a/.travis-test-riot.sh +++ b/.travis-test-riot.sh @@ -11,5 +11,10 @@ cd riot-web mkdir node_modules ln -s ../.. node_modules/matrix-react-sdk npm install + (cd node_modules/matrix-js-sdk && npm install) + +# https://github.com/webpack/webpack/issues/1472 workaround +(cd node_modules/matrix-react-sdk && npm install source-map-loader) + npm run test From 33d741e83d826b8540277f4869e84b08b010449d Mon Sep 17 00:00:00 2001 From: Richard van der Hoff Date: Thu, 19 Jan 2017 18:23:34 +0000 Subject: [PATCH 4/4] Do riot-web setup in a different order ... in an effort to stop npm cocking it up. --- .travis-test-riot.sh | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/.travis-test-riot.sh b/.travis-test-riot.sh index 482b4a21c1..c280044246 100755 --- a/.travis-test-riot.sh +++ b/.travis-test-riot.sh @@ -6,15 +6,20 @@ set -ev -git clone --depth=1 --branch develop https://github.com/vector-im/riot-web.git riot-web -cd riot-web +RIOT_WEB_DIR=riot-web +REACT_SDK_DIR=`pwd` + +git clone --depth=1 --branch develop https://github.com/vector-im/riot-web.git \ + "$RIOT_WEB_DIR" + +cd "$RIOT_WEB_DIR" + mkdir node_modules -ln -s ../.. node_modules/matrix-react-sdk npm install (cd node_modules/matrix-js-sdk && npm install) -# https://github.com/webpack/webpack/issues/1472 workaround -(cd node_modules/matrix-react-sdk && npm install source-map-loader) +rm -r node_modules/matrix-react-sdk +ln -s "$REACT_SDK_DIR" node_modules/matrix-react-sdk npm run test