From fd5193b9f492eaaa799059c0c050f50224b15dc4 Mon Sep 17 00:00:00 2001 From: Bruno Windels Date: Fri, 27 Jul 2018 14:36:47 +0200 Subject: [PATCH 1/7] try to run e2e tests in travis --- .travis-test-riot.sh | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/.travis-test-riot.sh b/.travis-test-riot.sh index eeba4d0b7e..9adc676b0e 100755 --- a/.travis-test-riot.sh +++ b/.travis-test-riot.sh @@ -10,7 +10,7 @@ RIOT_WEB_DIR=riot-web REACT_SDK_DIR=`pwd` scripts/fetchdep.sh vector-im riot-web -cd "$RIOT_WEB_DIR" +pushd "$RIOT_WEB_DIR" mkdir node_modules npm install @@ -24,3 +24,12 @@ rm -r node_modules/matrix-react-sdk ln -s "$REACT_SDK_DIR" node_modules/matrix-react-sdk npm run test +popd + +# run end to end tests +git clone https://github.com/matrix-org/matrix-react-end-to-end-tests.git --branch bwindels/ci_script +pushd matrix-react-end-to-end-tests +ln -s $REACT_SDK_DIR/$RIOT_WEB_DIR riot/riot-web +PUPPETEER_SKIP_CHROMIUM_DOWNLOAD=true sh ./install.sh +sh ./run.sh +popd From 0ee72a2972c0be5f91d74875abdad81949451191 Mon Sep 17 00:00:00 2001 From: Bruno Windels Date: Fri, 27 Jul 2018 15:23:37 +0200 Subject: [PATCH 2/7] disable tests for now to speed up trying stuff out, run the build as well --- .travis-test-riot.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/.travis-test-riot.sh b/.travis-test-riot.sh index 9adc676b0e..5f070a181c 100755 --- a/.travis-test-riot.sh +++ b/.travis-test-riot.sh @@ -23,6 +23,7 @@ ln -s "$REACT_SDK_DIR/node_modules/matrix-js-sdk" node_modules/matrix-js-sdk rm -r node_modules/matrix-react-sdk ln -s "$REACT_SDK_DIR" node_modules/matrix-react-sdk +npm run build npm run test popd From e08e09df9a69862b9add6f35c964dc10334e3b74 Mon Sep 17 00:00:00 2001 From: Bruno Windels Date: Fri, 27 Jul 2018 15:23:50 +0200 Subject: [PATCH 3/7] pass location of google-chrome-stable to e2e test runner --- .travis-test-riot.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.travis-test-riot.sh b/.travis-test-riot.sh index 5f070a181c..ff1666bfc0 100755 --- a/.travis-test-riot.sh +++ b/.travis-test-riot.sh @@ -32,5 +32,6 @@ git clone https://github.com/matrix-org/matrix-react-end-to-end-tests.git --bran pushd matrix-react-end-to-end-tests ln -s $REACT_SDK_DIR/$RIOT_WEB_DIR riot/riot-web PUPPETEER_SKIP_CHROMIUM_DOWNLOAD=true sh ./install.sh -sh ./run.sh + +CHROME_PATH=$(which google-chrome-stable) sh ./run.sh popd From 70f8ee0e8766c774302d4d31d9ae235c031317e9 Mon Sep 17 00:00:00 2001 From: Bruno Windels Date: Fri, 27 Jul 2018 16:25:49 +0200 Subject: [PATCH 4/7] install synapse prerequisites as part of build --- .travis.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.travis.yml b/.travis.yml index ec07243a28..0def6d50f7 100644 --- a/.travis.yml +++ b/.travis.yml @@ -15,5 +15,7 @@ addons: chrome: stable install: - npm install +# install synapse prerequisites for end to end tests + - 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.sh From 93f51eb6ce266470bd1f619b6c814a357d7660b4 Mon Sep 17 00:00:00 2001 From: Bruno Windels Date: Fri, 27 Jul 2018 19:34:01 +0200 Subject: [PATCH 5/7] force running scripts in bash, as it's not the default shell on Ubuntu (which is what Travis runs) --- .travis-test-riot.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.travis-test-riot.sh b/.travis-test-riot.sh index ff1666bfc0..cfbb5bafc8 100755 --- a/.travis-test-riot.sh +++ b/.travis-test-riot.sh @@ -31,7 +31,7 @@ popd git clone https://github.com/matrix-org/matrix-react-end-to-end-tests.git --branch bwindels/ci_script pushd matrix-react-end-to-end-tests ln -s $REACT_SDK_DIR/$RIOT_WEB_DIR riot/riot-web -PUPPETEER_SKIP_CHROMIUM_DOWNLOAD=true sh ./install.sh +PUPPETEER_SKIP_CHROMIUM_DOWNLOAD=true ./install.sh -CHROME_PATH=$(which google-chrome-stable) sh ./run.sh +CHROME_PATH=$(which google-chrome-stable) ./run.sh popd From 6f60b68ac7040353310d337f296329e299d5be98 Mon Sep 17 00:00:00 2001 From: Bruno Windels Date: Fri, 27 Jul 2018 20:21:42 +0200 Subject: [PATCH 6/7] Puppeteer does need it's own chrome after all The stable chrome travis provides is not supported. --- .travis-test-riot.sh | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/.travis-test-riot.sh b/.travis-test-riot.sh index cfbb5bafc8..c2e5f8cbd2 100755 --- a/.travis-test-riot.sh +++ b/.travis-test-riot.sh @@ -31,7 +31,8 @@ popd git clone https://github.com/matrix-org/matrix-react-end-to-end-tests.git --branch bwindels/ci_script 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 +# PUPPETEER_SKIP_CHROMIUM_DOWNLOAD=true ./install.sh +# CHROME_PATH=$(which google-chrome-stable) ./run.sh +./install.sh +./run.sh popd From e2695fb4674232097795b7ae8fe47c914a717507 Mon Sep 17 00:00:00 2001 From: Bruno Windels Date: Fri, 3 Aug 2018 11:43:12 +0200 Subject: [PATCH 7/7] now the ci scripts are merged in the test repo, change the branch to fetch them from to 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 c2e5f8cbd2..876ce207f3 100755 --- a/.travis-test-riot.sh +++ b/.travis-test-riot.sh @@ -28,7 +28,7 @@ npm run test popd # run end to end tests -git clone https://github.com/matrix-org/matrix-react-end-to-end-tests.git --branch bwindels/ci_script +git clone https://github.com/matrix-org/matrix-react-end-to-end-tests.git --branch 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