Skip to content

Commit

Permalink
Added docker dh for CI e2e tests (DH-18428)
Browse files Browse the repository at this point in the history
  • Loading branch information
bmingles committed Feb 3, 2025
1 parent 2685560 commit 7af2249
Show file tree
Hide file tree
Showing 4 changed files with 25 additions and 1 deletion.
2 changes: 1 addition & 1 deletion .github/workflows/e2e.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ jobs:
cache: 'npm'
- run: npm ci
- name: Run end-to-end tests
run: xvfb-run npm run test:e2e
run: xvfb-run npm run test:e2e:ci
- name: Publish Test Summary Results
if: ${{ always() }}
run: |
Expand Down
9 changes: 9 additions & 0 deletions e2e/docker-compose.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
services:
dhc-server:
container_name: dhc-server
image: ghcr.io/deephaven/server:${DHC_VERSION:-edge}
pull_policy: always
ports:
- 10000:10000
environment:
- START_OPTS=-Xmx4g -DAuthHandlers=io.deephaven.auth.AnonymousAuthenticationHandler -Ddeephaven.console.type=python -Ddeephaven.application.dir=./data/app.d
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@
"report:prcomment": "mkdir -p ./pr-comment && cp $GITHUB_STEP_SUMMARY pr-comment/pr-comment.html",
"test:ci": "npm run compile && npm run test:lint && npm run test:unit",
"test:e2e": "npm run compile && cd e2e && wdio run ./wdio.conf.ts",
"test:e2e:ci": "./scripts/e2e-docker.sh",
"test:lint": "eslint . --ext ts",
"test:unit": "vitest --reporter=default --reporter=junit --outputFile=./test-reports/vitest.junit.xml",
"test": "npm run test:unit",
Expand Down
14 changes: 14 additions & 0 deletions scripts/e2e-docker.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
pushd "e2e"

docker compose up -d

# Wait for the jsapi to be available as a pseudo-healthcheck
while ! curl --fail -I http://localhost:10000/jsapi/dh-core.js; do
echo "Waiting for jsapi to be available..."
sleep 5
done

echo "dhc-server is healthy. Running e2e tests..."
npm run test:e2e

docker compose down

0 comments on commit 7af2249

Please sign in to comment.