File tree Expand file tree Collapse file tree 2 files changed +64
-0
lines changed Expand file tree Collapse file tree 2 files changed +64
-0
lines changed Original file line number Diff line number Diff line change 1+ # 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
3+ #
4+ name : Tests
5+
6+ on :
7+ pull_request :
8+ push :
9+ workflow_dispatch :
10+
11+ jobs :
12+ # https://github.com/pre-commit/action
13+ pre-commit :
14+ name : Lint
15+ runs-on : ubuntu-latest
16+ steps :
17+ - uses : actions/checkout@v3
18+ - uses : actions/setup-python@v4
19+ - uses : pre-commit/action@v3.0.0
20+
21+ # Run tests
22+ test :
23+ runs-on : ubuntu-22.04
24+ timeout-minutes : 10
25+
26+ steps :
27+ - uses : actions/checkout@v3
28+
29+ - name : Get Docker version
30+ run : |
31+ docker --version
32+ docker-compose --version
33+
34+ - name : Run JupyterHub
35+ run : |
36+ docker-compose up -d
37+
38+ - name : check hun is running
39+ run : |
40+ ./ci/check_hub.sh
41+
42+ # Todo: check server can be spawned
Original file line number Diff line number Diff line change 1+ #! /bin/sh
2+ set -eu
3+
4+ count=0
5+ started=0
6+ # Max 5 minutes
7+ while [ $count -lt 60 ]; do
8+ sleep 5
9+ if curl -s http://localhost:8000/hub/api/; then
10+ started=1
11+ break
12+ fi
13+ echo -n .
14+ count=$(( count+ 1 ))
15+ done
16+ if [ $started -eq 0 ]; then
17+ echo " *****"
18+ echo " JupyterHub did not start"
19+ echo " *****"
20+ docker-compose logs
21+ exit 1
22+ fi
You can’t perform that action at this time.
0 commit comments