Skip to content

Commit 79b8e6d

Browse files
committed
update: dynamical running of notebooks healthchecks
1 parent 3d7d088 commit 79b8e6d

File tree

3 files changed

+17
-2
lines changed

3 files changed

+17
-2
lines changed

.env

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,4 @@ IMAGE_TAG=latest
22
PORT=3001
33
VNC_PORT=5920
44

5-
USE_JUPYTERLITE_DEV_URL=false
5+
USE_JUPYTERLITE_DEV_URL=true

tests/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
"main": "index.js",
66
"scripts": {
77
"test": "CYPRESS_BASE_URL=${CYPRESS_BASE_URL:-'http://localhost:3001'} cypress open",
8-
"test:headless": "export TAGS=${TAGS:-'not @ignore'}; CYPRESS_BASE_URL=${CYPRESS_BASE_URL:-'http://localhost:3001'} cypress run -e TAGS=\"$TAGS\"",
8+
"test:headless": "./run-tests.sh",
99
"test:healthcheck": "TAGS='not @ignore and @notebook_healthcheck' npm run test:headless",
1010
"lint": "npx eslint cypress && prettier --write cypress"
1111
},

tests/run-tests.sh

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
#!/bin/bash
2+
3+
# Set default TAGS if not provided
4+
TAGS=${TAGS:-"not @ignore"}
5+
6+
# If not using dev JupyterLite, exclude notebook healthcheck tests
7+
if [ "$USE_JUPYTERLITE_DEV_URL" != "true" ]; then
8+
TAGS="$TAGS and not @notebook_healthcheck"
9+
fi
10+
11+
# Set default Cypress base URL
12+
CYPRESS_BASE_URL=${CYPRESS_BASE_URL:-"http://localhost:3001"}
13+
14+
# Run Cypress tests
15+
cypress run -e TAGS="$TAGS"

0 commit comments

Comments
 (0)