Merge pull request #1869 from matrix-org/dbkr/use_correct_js_sdk_branch

Use the right js-sdk branch when testing
pull/21833/head
Luke Barnard 2018-05-02 11:39:35 +01:00 committed by GitHub
commit 33e67a8f42
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 21 additions and 9 deletions

View File

@ -9,16 +9,9 @@ set -ev
RIOT_WEB_DIR=riot-web RIOT_WEB_DIR=riot-web
REACT_SDK_DIR=`pwd` REACT_SDK_DIR=`pwd`
curbranch="${TRAVIS_PULL_REQUEST_BRANCH:-$TRAVIS_BRANCH}" scripts/fetchdep.sh vector-im riot-web
echo "Determined branch to be $curbranch"
git clone https://github.com/vector-im/riot-web.git \
"$RIOT_WEB_DIR"
cd "$RIOT_WEB_DIR" cd "$RIOT_WEB_DIR"
git checkout "$curbranch" || git checkout develop
mkdir node_modules mkdir node_modules
npm install npm install

View File

@ -15,6 +15,5 @@ addons:
chrome: stable chrome: stable
install: install:
- npm install - npm install
- (cd node_modules/matrix-js-sdk && npm install)
script: script:
./scripts/travis.sh ./scripts/travis.sh

12
scripts/fetchdep.sh Executable file
View File

@ -0,0 +1,12 @@
#!/bin/sh
set -e
org="$1"
repo="$2"
curbranch="${TRAVIS_PULL_REQUEST_BRANCH:-$TRAVIS_BRANCH}"
echo "Determined branch to be $curbranch"
git clone https://github.com/$org/$repo.git $repo --branch "$curbranch" || git clone https://github.com/$org/$repo.git $repo --branch develop

View File

@ -2,6 +2,14 @@
set -ex set -ex
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
cd matrix-js-sdk
npm install
cd ..
npm run test npm run test
./.travis-test-riot.sh ./.travis-test-riot.sh