install static webserver for server symlinked riot on CI

pull/21833/head
Bruno Windels 2019-10-10 11:40:04 +02:00
parent 2d848bba29
commit 645a9d836f
2 changed files with 19 additions and 7 deletions

View File

@ -34,6 +34,8 @@ ln -s $REACT_SDK_DIR/$RIOT_WEB_DIR riot/riot-web
# CHROME_PATH=$(which google-chrome-stable) ./run.sh # CHROME_PATH=$(which google-chrome-stable) ./run.sh
echo "--- Install synapse & other dependencies" echo "--- Install synapse & other dependencies"
./install.sh ./install.sh
# install (only) static webserver to server symlinked local copy of riot
./riot/install.sh --without-riot
mkdir logs mkdir logs
echo "+++ Running end-to-end tests" echo "+++ Running end-to-end tests"
TESTS_STARTED=1 TESTS_STARTED=1

24
test/end-to-end-tests/riot/install.sh Executable file → Normal file
View File

@ -2,6 +2,14 @@
set -e set -e
RIOT_BRANCH=develop RIOT_BRANCH=develop
with_riot=1
for i in $@; do
if [ "$i" == "--without-riot" ] ; then
with_riot=0
fi
done
BASE_DIR=$(cd $(dirname $0) && pwd) BASE_DIR=$(cd $(dirname $0) && pwd)
cd $BASE_DIR cd $BASE_DIR
# Install ComplexHttpServer (a drop in replacement for Python's SimpleHttpServer # Install ComplexHttpServer (a drop in replacement for Python's SimpleHttpServer
@ -26,10 +34,12 @@ if [ -d $BASE_DIR/riot-web ]; then
exit exit
fi fi
curl -L https://github.com/vector-im/riot-web/archive/${RIOT_BRANCH}.zip --output riot.zip if [ $with_riot -eq 1 ]; then
unzip -q riot.zip curl -L https://github.com/vector-im/riot-web/archive/${RIOT_BRANCH}.zip --output riot.zip
rm riot.zip unzip -q riot.zip
mv riot-web-${RIOT_BRANCH} riot-web rm riot.zip
cd riot-web mv riot-web-${RIOT_BRANCH} riot-web
yarn install cd riot-web
yarn run build yarn install
yarn run build
fi