Skip to content
This repository has been archived by the owner on Sep 11, 2024. It is now read-only.

Refactor travis-ci to use parallel jobs #2414

Merged
merged 7 commits into from
Jan 9, 2019
Merged
Show file tree
Hide file tree
Changes from 5 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 15 additions & 5 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,18 @@ 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:
bwindels marked this conversation as resolved.
Show resolved Hide resolved
include:
- name: Linting Checks
bwindels marked this conversation as resolved.
Show resolved Hide resolved
script:
# run the linter, but exclude any files known to have errors or warnings.
- npm run lintwithexclusions
bwindels marked this conversation as resolved.
Show resolved Hide resolved
- name: End-to-End Tests
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
bwindels marked this conversation as resolved.
Show resolved Hide resolved
- name: Unit Tests
script:
- ./scripts/travis/unit-tests.sh
14 changes: 0 additions & 14 deletions .travis-test-riot.sh → scripts/travis/build.sh
100755 → 100644
Original file line number Diff line number Diff line change
Expand Up @@ -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
24 changes: 24 additions & 0 deletions scripts/travis/end-to-end-tests.sh
Original file line number Diff line number Diff line change
@@ -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
6 changes: 0 additions & 6 deletions scripts/travis.sh → scripts/travis/install-deps.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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 changes: 10 additions & 0 deletions scripts/travis/unit-tests.sh
Original file line number Diff line number Diff line change
@@ -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