File tree Expand file tree Collapse file tree 5 files changed +14
-16
lines changed Expand file tree Collapse file tree 5 files changed +14
-16
lines changed Original file line number Diff line number Diff line change 11# This is a GitHub workflow defining a set of jobs with a set of steps.
2- # ref: https://docs.github.com/en/free-pro-team@latest/ actions/reference /workflow-syntax-for-github-actions
2+ # ref: https://docs.github.com/en/actions/using-workflows /workflow-syntax-for-github-actions
33#
44name : Tests
55
@@ -15,14 +15,15 @@ jobs:
1515 # https://github.com/pre-commit/action
1616 pre-commit :
1717 name : Lint
18- runs-on : ubuntu-latest
18+ runs-on : ubuntu-22.04
1919 steps :
2020 - uses : actions/checkout@v3
2121 - uses : actions/setup-python@v4
2222 - uses : pre-commit/action@v3.0.0
2323
2424 # Run tests
2525 test :
26+ name : Test
2627 runs-on : ubuntu-22.04
2728 timeout-minutes : 10
2829 strategy :
4748 run : cat ci/config_token.py >> ${{ matrix.example }}/jupyterhub_config.py
4849
4950 - name : Run JupyterHub
50- run : |
51- cd ${{ matrix.example }}
52- docker-compose up -d
51+ working-directory : ${{ matrix.example }}
52+ run : docker-compose up --detach
5353
5454 - name : Test
55- run : |
56- cd ${{ matrix.example }}
57- pytest -vs
55+ working-directory : ${{ matrix.example }}
56+ run : pytest --verbose --capture=no
Original file line number Diff line number Diff line change @@ -4,9 +4,9 @@ ARG JUPYTERHUB_VERSION
44FROM jupyterhub/jupyterhub:$JUPYTERHUB_VERSION
55
66# Install dockerspawner, nativeauthenticator
7+ # hadolint ignore=DL3013
78RUN python3 -m pip install --no-cache-dir \
8- dockerspawner==12.* \
9- jupyterhub-nativeauthenticator==1.*
9+ dockerspawner \
10+ jupyterhub-nativeauthenticator
1011
11- COPY ./jupyterhub_config.py /srv/jupyterhub/jupyterhub_config.py
1212CMD ["jupyterhub", "-f", "/srv/jupyterhub/jupyterhub_config.py"]
Original file line number Diff line number Diff line change @@ -32,13 +32,11 @@ services:
3232 # All containers will join this network
3333 DOCKER_NETWORK_NAME : jupyterhub-network
3434 # JupyterHub will spawn this Notebook image for users
35- DOCKER_NOTEBOOK_IMAGE : jupyter/minimal -notebook:latest
35+ DOCKER_NOTEBOOK_IMAGE : jupyter/base -notebook:latest
3636 # Notebook directory inside user image
3737 DOCKER_NOTEBOOK_DIR : /home/jovyan/work
3838 # Using this run command
3939 DOCKER_SPAWN_CMD : start-singleuser.sh
40- command : >
41- jupyterhub -f /srv/jupyterhub/jupyterhub_config.py
4240
4341volumes :
4442 jupyterhub-data :
Original file line number Diff line number Diff line change 3030c .DockerSpawner .network_name = network_name
3131
3232# Explicitly set notebook directory because we'll be mounting a volume to it.
33- # Most jupyter/docker-stacks *-notebook images run the Notebook server as
33+ # Most ` jupyter/docker-stacks` *-notebook images run the Notebook server as
3434# user `jovyan`, and set the notebook directory to `/home/jovyan/work`.
3535# We follow the same convention.
36- notebook_dir = os .environ .get ("DOCKER_NOTEBOOK_DIR" ) or "/home/jovyan/work"
36+ notebook_dir = os .environ .get ("DOCKER_NOTEBOOK_DIR" , "/home/jovyan/work" )
3737c .DockerSpawner .notebook_dir = notebook_dir
3838
3939# Mount the real user's Docker volume on the host to the notebook user's
Original file line number Diff line number Diff line change @@ -13,6 +13,7 @@ while [ $count -lt 60 ]; do
1313 printf .
1414 count=$(( count+ 1 ))
1515done
16+
1617if [ $started -eq 0 ]; then
1718 echo " *****"
1819 echo " JupyterHub did not start"
You can’t perform that action at this time.
0 commit comments