From 5984eb63ac016ed5de9e00124cfa49f47b03355f Mon Sep 17 00:00:00 2001 From: Erik Johnston Date: Tue, 8 Jan 2019 11:21:19 +0000 Subject: [PATCH] Refactor travis-ci to use parallel jobs --- .travis.yml | 21 +++++++++++++++++-- scripts/{travis.sh => travis/install-deps.sh} | 6 ------ .../travis/test-riot.sh | 0 3 files changed, 19 insertions(+), 8 deletions(-) rename scripts/{travis.sh => travis/install-deps.sh} (58%) rename .travis-test-riot.sh => scripts/travis/test-riot.sh (100%) diff --git a/.travis.yml b/.travis.yml index 0def6d50f75f..d967e52b5e37 100644 --- a/.travis.yml +++ b/.travis.yml @@ -15,7 +15,24 @@ 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 + - ./scripts/travis/install-deps.sh script: ./scripts/travis.sh + +matrix: + include: + - env: TEST=lint + script: + # run the linter, but exclude any files known to have errors or warnings. + - npm run lintwithexclusions + - env: TEST=e2e-tests + 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 + script: + - ./scripts/travis/test-riot.sh + - env: TEST=unit-tests + script: + - npm run test + diff --git a/scripts/travis.sh b/scripts/travis/install-deps.sh similarity index 58% rename from scripts/travis.sh rename to scripts/travis/install-deps.sh index 48410ea90438..5acc801af8cf 100755 --- a/scripts/travis.sh +++ b/scripts/travis/install-deps.sh @@ -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 diff --git a/.travis-test-riot.sh b/scripts/travis/test-riot.sh similarity index 100% rename from .travis-test-riot.sh rename to scripts/travis/test-riot.sh