From cc158a2bb285ff5b226ab2c82a3006222958f7f2 Mon Sep 17 00:00:00 2001 From: Phil Booth Date: Thu, 25 Oct 2018 16:31:31 +0100 Subject: [PATCH] fix(ci): update travis to use oauth server in auth server repo --- .travis.yml | 4 ++-- tests/ci/deps.sh | 19 ++++++++++++++----- 2 files changed, 16 insertions(+), 7 deletions(-) diff --git a/.travis.yml b/.travis.yml index 858b63ebdc..4ba426e0e4 100644 --- a/.travis.yml +++ b/.travis.yml @@ -31,9 +31,9 @@ group: deprecated-2017Q3 cache: directories: - node_modules - - deps/node_modules/fxa-auth-server/node_modules + - deps/fxa-auth-server/node_modules - deps/node_modules/fxa-profile-server/node_modules - - deps/node_modules/fxa-oauth-server/node_modules + - deps/fxa-auth-server/fxa-oauth-server/node_modules notifications: irc: diff --git a/tests/ci/deps.sh b/tests/ci/deps.sh index 5d07216ab0..2a601632b2 100755 --- a/tests/ci/deps.sh +++ b/tests/ci/deps.sh @@ -5,19 +5,28 @@ mkdir -p deps/node_modules cd deps # Auth -git clone https://github.com/mozilla/fxa-auth-server.git --depth=1 -cd fxa-auth-server +if [ -d fxa-auth-server ] +then + # node_modules is cached and we can't clone into a non-empty directory + cd fxa-auth-server + git init + git remote add origin https://github.com/mozilla/fxa-auth-server.git + git fetch origin master + git checkout -f -b master origin/master +else + git clone https://github.com/mozilla/fxa-auth-server.git --depth=1 + cd fxa-auth-server +fi # Install devDeps for the Auth Server to get memory db npm i &> /dev/null LOG_LEVEL=error node ./node_modules/fxa-auth-db-mysql/bin/mem.js & node ./scripts/gen_keys.js SIGNIN_UNBLOCK_ALLOWED_EMAILS="^block.*@restmail\\.net$" SIGNIN_UNBLOCK_FORCED_EMAILS="^block.*@restmail\\.net$" npm start &> /dev/null & -cd .. # OAuth -npm i mozilla/fxa-oauth-server &> /dev/null -cd node_modules/fxa-oauth-server +cd fxa-oauth-server +npm i > /dev/null LOG_LEVEL=error NODE_ENV=dev node ./bin/server.js & cd ../..