From 4f0a128c49b8773e0d7de5cabb32d77adf65b04b Mon Sep 17 00:00:00 2001 From: GeorgianaElena Date: Thu, 5 Mar 2020 21:04:56 +0200 Subject: [PATCH] Use PR username when no CircleCi project --- .circleci/config.yml | 18 +++++++++++++++--- 1 file changed, 15 insertions(+), 3 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 2c2a055..e2bc27f 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -42,7 +42,11 @@ commands: - run: name: Run basic tests command: | - BOOTSTRAP_PIP_SPEC=git+https://github.com/$CIRCLE_PROJECT_USERNAME/the-littlest-jupyterhub.git@$CIRCLE_SHA1 + if [ $CIRCLE_PR_USERNAME ]; then + BOOTSTRAP_PIP_SPEC=git+https://github.com/$CIRCLE_PR_USERNAME/the-littlest-jupyterhub.git@$CIRCLE_SHA1 + else + BOOTSTRAP_PIP_SPEC=git+https://github.com/$CIRCLE_PROJECT_USERNAME/the-littlest-jupyterhub.git@$CIRCLE_SHA1 + fi .circleci/integration-test.py run-test basic-tests \ "$BOOTSTRAP_PIP_SPEC" test_hub.py test_install.py test_extensions.py \ @@ -56,7 +60,11 @@ commands: - run: name: Run admin tests command: | - BOOTSTRAP_PIP_SPEC=git+https://github.com/$CIRCLE_PROJECT_USERNAME/the-littlest-jupyterhub.git@$CIRCLE_SHA1 + if [ $CIRCLE_PR_USERNAME ]; then + BOOTSTRAP_PIP_SPEC=git+https://github.com/$CIRCLE_PR_USERNAME/the-littlest-jupyterhub.git@$CIRCLE_SHA1 + else + BOOTSTRAP_PIP_SPEC=git+https://github.com/$CIRCLE_PROJECT_USERNAME/the-littlest-jupyterhub.git@$CIRCLE_SHA1 + fi .circleci/integration-test.py run-test \ --installer-args "--admin admin:admin" \ @@ -72,7 +80,11 @@ commands: - run: name: Run plugin tests command: | - BOOTSTRAP_PIP_SPEC=git+https://github.com/$CIRCLE_PROJECT_USERNAME/the-littlest-jupyterhub.git@$CIRCLE_SHA1 + if [ $CIRCLE_PR_USERNAME ]; then + BOOTSTRAP_PIP_SPEC=git+https://github.com/$CIRCLE_PR_USERNAME/the-littlest-jupyterhub.git@$CIRCLE_SHA1 + else + BOOTSTRAP_PIP_SPEC=git+https://github.com/$CIRCLE_PROJECT_USERNAME/the-littlest-jupyterhub.git@$CIRCLE_SHA1 + fi .circleci/integration-test.py run-test \ --installer-args "--plugin /srv/src/integration-tests/plugins/simplest" \