split up installing static webserver and riot copy
so we can just do the latter for the e2e tests on CI
This commit is contained in:
parent
dca968375d
commit
b03ebb964b
4 changed files with 32 additions and 41 deletions
|
@ -34,8 +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
|
# install static webserver to server symlinked local copy of riot
|
||||||
./riot/install.sh --without-riot
|
./riot/install-webserver.sh
|
||||||
mkdir logs
|
mkdir logs
|
||||||
echo "+++ Running end-to-end tests"
|
echo "+++ Running end-to-end tests"
|
||||||
TESTS_STARTED=1
|
TESTS_STARTED=1
|
||||||
|
|
|
@ -2,7 +2,6 @@
|
||||||
# run with PUPPETEER_SKIP_CHROMIUM_DOWNLOAD=true sh install.sh if chrome is already installed
|
# run with PUPPETEER_SKIP_CHROMIUM_DOWNLOAD=true sh install.sh if chrome is already installed
|
||||||
set -e
|
set -e
|
||||||
./synapse/install.sh
|
./synapse/install.sh
|
||||||
# both CI and local testing don't need a Riot fetched from master,
|
# local testing doesn't need a Riot fetched from master,
|
||||||
# so not installing this by default anymore
|
# so not installing that by default
|
||||||
# ./riot/install.sh
|
|
||||||
yarn install
|
yarn install
|
||||||
|
|
21
test/end-to-end-tests/riot/install-webserver.sh
Executable file
21
test/end-to-end-tests/riot/install-webserver.sh
Executable file
|
@ -0,0 +1,21 @@
|
||||||
|
#!/bin/bash
|
||||||
|
set -e
|
||||||
|
|
||||||
|
BASE_DIR=$(cd $(dirname $0) && pwd)
|
||||||
|
cd $BASE_DIR
|
||||||
|
# Install ComplexHttpServer (a drop in replacement for Python's SimpleHttpServer
|
||||||
|
# but with support for multiple threads) into a virtualenv.
|
||||||
|
(
|
||||||
|
virtualenv -p python3 env
|
||||||
|
source env/bin/activate
|
||||||
|
|
||||||
|
# Having been bitten by pip SSL fail too many times, I don't trust the existing pip
|
||||||
|
# to be able to --upgrade itself, so grab a new one fresh from source.
|
||||||
|
curl https://bootstrap.pypa.io/get-pip.py -o get-pip.py
|
||||||
|
python get-pip.py
|
||||||
|
rm get-pip.py
|
||||||
|
|
||||||
|
pip install ComplexHttpServer
|
||||||
|
|
||||||
|
deactivate
|
||||||
|
)
|
|
@ -2,44 +2,15 @@
|
||||||
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)
|
|
||||||
cd $BASE_DIR
|
|
||||||
# Install ComplexHttpServer (a drop in replacement for Python's SimpleHttpServer
|
|
||||||
# but with support for multiple threads) into a virtualenv.
|
|
||||||
(
|
|
||||||
virtualenv -p python3 env
|
|
||||||
source env/bin/activate
|
|
||||||
|
|
||||||
# Having been bitten by pip SSL fail too many times, I don't trust the existing pip
|
|
||||||
# to be able to --upgrade itself, so grab a new one fresh from source.
|
|
||||||
curl https://bootstrap.pypa.io/get-pip.py -o get-pip.py
|
|
||||||
python get-pip.py
|
|
||||||
rm get-pip.py
|
|
||||||
|
|
||||||
pip install ComplexHttpServer
|
|
||||||
|
|
||||||
deactivate
|
|
||||||
)
|
|
||||||
|
|
||||||
if [ -d $BASE_DIR/riot-web ]; then
|
if [ -d $BASE_DIR/riot-web ]; then
|
||||||
echo "riot is already installed"
|
echo "riot is already installed"
|
||||||
exit
|
exit
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ $with_riot -eq 1 ]; then
|
curl -L https://github.com/vector-im/riot-web/archive/${RIOT_BRANCH}.zip --output riot.zip
|
||||||
curl -L https://github.com/vector-im/riot-web/archive/${RIOT_BRANCH}.zip --output riot.zip
|
unzip -q riot.zip
|
||||||
unzip -q riot.zip
|
rm riot.zip
|
||||||
rm riot.zip
|
mv riot-web-${RIOT_BRANCH} riot-web
|
||||||
mv riot-web-${RIOT_BRANCH} riot-web
|
cd riot-web
|
||||||
cd riot-web
|
yarn install
|
||||||
yarn install
|
yarn run build
|
||||||
yarn run build
|
|
||||||
fi
|
|
||||||
|
|
Loading…
Reference in a new issue