mirror of
https://github.com/jupyterhub/the-littlest-jupyterhub.git
synced 2025-12-18 21:54:05 +08:00
Fix
This commit is contained in:
@@ -37,58 +37,61 @@ commands:
|
|||||||
upgrade:
|
upgrade:
|
||||||
type: string
|
type: string
|
||||||
default: ""
|
default: ""
|
||||||
branch_path:
|
|
||||||
type: string
|
|
||||||
default: ""
|
|
||||||
steps:
|
steps:
|
||||||
- run:
|
- run:
|
||||||
name: Run basic tests
|
name: Run basic tests
|
||||||
command: |
|
command: |
|
||||||
CIRCLE_PR_BRANCH=`curl -s https://api.github.com/repos/$CIRCLE_PROJECT_USERNAME/$CIRCLE_PROJECT_REPONAME/pulls/$CIRCLE_PR_NUMBER | grep '"ref":' | grep -v "master" | cut -d '"' -f4`
|
PR_BRANCH=`(curl -s https://api.github.com/repos/$CIRCLE_PROJECT_USERNAME/$CIRCLE_PROJECT_REPONAME/pulls/$CIRCLE_PR_NUMBER | jq -r ".head.ref")`
|
||||||
BRANCH=git+https://github.com/$CIRCLE_PROJECT_USERNAME/the-littlest-jupyterhub.git@$CIRCLE_PR_BRANCH
|
if [ "$PR_BRANCH" == "null" ];then
|
||||||
.circleci/integration-test.py run-test basic-tests \
|
PR_BRANCH=$CIRCLE_BRANCH
|
||||||
test_hub.py test_install.py test_extensions.py \
|
fi
|
||||||
<< parameters.upgrade >> $BRANCH
|
BRANCH=git+https://github.com/$CIRCLE_PROJECT_USERNAME/the-littlest-jupyterhub.git@$PR_BRANCH
|
||||||
|
|
||||||
|
.circleci/integration-test.py run-test basic-tests \
|
||||||
|
"$BRANCH" test_hub.py test_install.py test_extensions.py \
|
||||||
|
<< parameters.upgrade >>
|
||||||
admin_tests:
|
admin_tests:
|
||||||
parameters:
|
parameters:
|
||||||
upgrade:
|
upgrade:
|
||||||
type: string
|
type: string
|
||||||
default: ""
|
default: ""
|
||||||
branch_path:
|
|
||||||
type: string
|
|
||||||
default: ""
|
|
||||||
steps:
|
steps:
|
||||||
- run:
|
- run:
|
||||||
name: Run admin tests
|
name: Run admin tests
|
||||||
command: |
|
command: |
|
||||||
|
PR_BRANCH=`(curl -s https://api.github.com/repos/$CIRCLE_PROJECT_USERNAME/$CIRCLE_PROJECT_REPONAME/pulls/$CIRCLE_PR_NUMBER | jq -r ".head.ref")`
|
||||||
|
if [ "$PR_BRANCH" == "null" ];then
|
||||||
|
PR_BRANCH=$CIRCLE_BRANCH
|
||||||
|
fi
|
||||||
|
BRANCH=git+https://github.com/$CIRCLE_PROJECT_USERNAME/the-littlest-jupyterhub.git@$PR_BRANCH
|
||||||
|
|
||||||
.circleci/integration-test.py run-test \
|
.circleci/integration-test.py run-test \
|
||||||
--installer-args "--admin admin:admin" \
|
--installer-args "--admin admin:admin" \
|
||||||
basic-tests test_admin_installer.py \
|
basic-tests $BRANCH test_admin_installer.py \
|
||||||
<< parameters.upgrade >> << parameters.branch_path >>
|
<< parameters.upgrade >>
|
||||||
|
|
||||||
plugin_tests:
|
plugin_tests:
|
||||||
parameters:
|
parameters:
|
||||||
upgrade:
|
upgrade:
|
||||||
type: string
|
type: string
|
||||||
default: ""
|
default: ""
|
||||||
branch_path:
|
|
||||||
type: string
|
|
||||||
default: ""
|
|
||||||
steps:
|
steps:
|
||||||
- run:
|
- run:
|
||||||
name: Run plugin tests
|
name: Run plugin tests
|
||||||
command: |
|
command: |
|
||||||
|
PR_BRANCH=`(curl -s https://api.github.com/repos/$CIRCLE_PROJECT_USERNAME/$CIRCLE_PROJECT_REPONAME/pulls/$CIRCLE_PR_NUMBER | jq -r ".head.ref")`
|
||||||
|
if [ "$PR_BRANCH" == "null" ];then
|
||||||
|
PR_BRANCH=$CIRCLE_BRANCH
|
||||||
|
fi
|
||||||
|
BRANCH=git+https://github.com/$CIRCLE_PROJECT_USERNAME/the-littlest-jupyterhub.git@$PR_BRANCH
|
||||||
|
|
||||||
.circleci/integration-test.py run-test \
|
.circleci/integration-test.py run-test \
|
||||||
--installer-args "--plugin /srv/src/integration-tests/plugins/simplest" \
|
--installer-args "--plugin /srv/src/integration-tests/plugins/simplest" \
|
||||||
plugins test_simplest_plugin.py \
|
plugins $BRANCH test_simplest_plugin.py \
|
||||||
<< parameters.upgrade >>
|
<< parameters.upgrade >>
|
||||||
|
|
||||||
bootstrap_checks:
|
bootstrap_checks:
|
||||||
parameters:
|
parameters:
|
||||||
branch_path:
|
|
||||||
type: string
|
|
||||||
default: ""
|
|
||||||
steps:
|
steps:
|
||||||
- run:
|
- run:
|
||||||
name: Run bootstrap checks
|
name: Run bootstrap checks
|
||||||
@@ -143,9 +146,10 @@ jobs:
|
|||||||
command: |
|
command: |
|
||||||
apk add --no-cache python3 pytest
|
apk add --no-cache python3 pytest
|
||||||
- run:
|
- run:
|
||||||
name: install curl
|
name: install curl and jq
|
||||||
command: |
|
command: |
|
||||||
apk add curl curl-dev
|
apk add curl curl-dev
|
||||||
|
apk add jq
|
||||||
|
|
||||||
- checkout
|
- checkout
|
||||||
|
|
||||||
@@ -153,13 +157,13 @@ jobs:
|
|||||||
|
|
||||||
- build_systemd_image
|
- build_systemd_image
|
||||||
|
|
||||||
- basic_tests:
|
- basic_tests
|
||||||
|
|
||||||
- admin_tests:
|
- admin_tests
|
||||||
|
|
||||||
- plugin_tests:
|
- plugin_tests
|
||||||
|
|
||||||
- bootstrap_checks:
|
- bootstrap_checks
|
||||||
|
|
||||||
|
|
||||||
upgrade-test:
|
upgrade-test:
|
||||||
|
|||||||
@@ -33,11 +33,13 @@ def run_systemd_image(image_name, container_name, branch_path):
|
|||||||
# to need at least this much RAM to build. Boo?
|
# to need at least this much RAM to build. Boo?
|
||||||
# If we change this, need to change all other references to this number.
|
# If we change this, need to change all other references to this number.
|
||||||
'--memory', '1G',
|
'--memory', '1G',
|
||||||
image_name
|
|
||||||
]
|
]
|
||||||
|
|
||||||
if branch_path:
|
if branch_path:
|
||||||
cmd.append('-e', f'TLJH_BOOTSTRAP_PIP_SPEC="{branch_path}"')
|
cmd.append('-e')
|
||||||
|
cmd.append(f'TLJH_BOOTSTRAP_PIP_SPEC={branch_path}')
|
||||||
|
|
||||||
|
cmd.append(image_name)
|
||||||
|
|
||||||
subprocess.check_call(cmd)
|
subprocess.check_call(cmd)
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user