mirror of
https://github.com/element-hq/element-web
synced 2024-11-26 03:05:51 +03:00
split up script for unit and end-to-end tests so unit tests are not run as part of e2e tests
This commit is contained in:
parent
ba5e3f86cb
commit
5ce08523f8
4 changed files with 36 additions and 21 deletions
|
@ -14,9 +14,7 @@ node_js:
|
||||||
addons:
|
addons:
|
||||||
chrome: stable
|
chrome: stable
|
||||||
install:
|
install:
|
||||||
- npm install
|
|
||||||
- ./scripts/travis/install-deps.sh
|
- ./scripts/travis/install-deps.sh
|
||||||
|
|
||||||
matrix:
|
matrix:
|
||||||
include:
|
include:
|
||||||
- name: Linting Checks
|
- name: Linting Checks
|
||||||
|
@ -25,12 +23,9 @@ matrix:
|
||||||
- npm run lintwithexclusions
|
- npm run lintwithexclusions
|
||||||
- name: End-to-End Tests
|
- name: End-to-End Tests
|
||||||
install:
|
install:
|
||||||
- npm install
|
|
||||||
- ./scripts/travis/install-deps.sh
|
|
||||||
- sudo apt-get install build-essential python2.7-dev libffi-dev python-pip python-setuptools sqlite3 libssl-dev python-virtualenv libjpeg-dev libxslt1-dev
|
- 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:
|
script:
|
||||||
- ./scripts/travis/test-riot.sh
|
- ./scripts/travis/end-to-end-tests.sh
|
||||||
- name: Unit Tests
|
- name: Unit Tests
|
||||||
script:
|
script:
|
||||||
- npm run test
|
- ./scripts/travis/unit-tests.sh
|
||||||
|
|
||||||
|
|
14
scripts/travis/test-riot.sh → scripts/travis/build.sh
Executable file → Normal file
14
scripts/travis/test-riot.sh → scripts/travis/build.sh
Executable file → Normal file
|
@ -24,18 +24,4 @@ rm -r node_modules/matrix-react-sdk
|
||||||
ln -s "$REACT_SDK_DIR" node_modules/matrix-react-sdk
|
ln -s "$REACT_SDK_DIR" node_modules/matrix-react-sdk
|
||||||
|
|
||||||
npm run build
|
npm run build
|
||||||
npm run test
|
|
||||||
popd
|
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
|
|
24
scripts/travis/end-to-end-tests.sh
Executable file
24
scripts/travis/end-to-end-tests.sh
Executable file
|
@ -0,0 +1,24 @@
|
||||||
|
#!/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`
|
||||||
|
|
||||||
|
if [ "$TRAVIS_BRANCH" = "develop" ]
|
||||||
|
then
|
||||||
|
scripts/travis/build.sh
|
||||||
|
# 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
|
10
scripts/travis/unit-tests.sh
Normal file
10
scripts/travis/unit-tests.sh
Normal file
|
@ -0,0 +1,10 @@
|
||||||
|
#!/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
|
||||||
|
|
||||||
|
scripts/travis/build.sh
|
||||||
|
npm run test
|
Loading…
Reference in a new issue