mirror of
https://github.com/element-hq/element-web
synced 2024-11-27 11:47:23 +03:00
Merge pull request #2414 from matrix-org/erikj/travis_cleanup
Refactor travis-ci to use parallel jobs
This commit is contained in:
commit
0b4ce3c58e
5 changed files with 48 additions and 26 deletions
21
.travis.yml
21
.travis.yml
|
@ -14,8 +14,19 @@ node_js:
|
|||
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
|
||||
- ./scripts/travis/install-deps.sh
|
||||
matrix:
|
||||
include:
|
||||
- name: Linting Checks
|
||||
script:
|
||||
# run the linter, but exclude any files known to have errors or warnings.
|
||||
- npm run lintwithexclusions
|
||||
- name: End-to-End Tests
|
||||
if: branch = develop
|
||||
install:
|
||||
- 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/end-to-end-tests.sh
|
||||
- name: Unit Tests
|
||||
script:
|
||||
- ./scripts/travis/unit-tests.sh
|
||||
|
|
|
@ -24,18 +24,4 @@ rm -r node_modules/matrix-react-sdk
|
|||
ln -s "$REACT_SDK_DIR" node_modules/matrix-react-sdk
|
||||
|
||||
npm run build
|
||||
npm run test
|
||||
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
|
21
scripts/travis/end-to-end-tests.sh
Executable file
21
scripts/travis/end-to-end-tests.sh
Executable file
|
@ -0,0 +1,21 @@
|
|||
#!/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`
|
||||
|
||||
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
|
|
@ -1,7 +1,7 @@
|
|||
#!/bin/sh
|
||||
|
||||
set -ex
|
||||
|
||||
npm install
|
||||
scripts/fetchdep.sh matrix-org matrix-js-sdk
|
||||
rm -r node_modules/matrix-js-sdk || true
|
||||
ln -s ../matrix-js-sdk node_modules/matrix-js-sdk
|
||||
|
@ -9,9 +9,3 @@ ln -s ../matrix-js-sdk node_modules/matrix-js-sdk
|
|||
cd matrix-js-sdk
|
||||
npm install
|
||||
cd ..
|
||||
|
||||
npm run test
|
||||
./.travis-test-riot.sh
|
||||
|
||||
# run the linter, but exclude any files known to have errors or warnings.
|
||||
npm run lintwithexclusions
|
10
scripts/travis/unit-tests.sh
Executable file
10
scripts/travis/unit-tests.sh
Executable 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