Merge pull request #2414 from matrix-org/erikj/travis_cleanup

Refactor travis-ci to use parallel jobs
pull/21833/head
Erik Johnston 2019-01-09 13:52:29 +00:00 committed by GitHub
commit 0b4ce3c58e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 48 additions and 26 deletions

View File

@ -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

View File

@ -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

View 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

View File

@ -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
View 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