Skip to content

Commit

Permalink
build(database-client): set up initial ceramic integration testing in…
Browse files Browse the repository at this point in the history
… docker-compose
  • Loading branch information
shavinac committed May 9, 2022
1 parent be1b8b0 commit 27e4582
Show file tree
Hide file tree
Showing 3 changed files with 38 additions and 1 deletion.
24 changes: 24 additions & 0 deletions database-client/integration-tests/run-ceramic-tests.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
#!/usr/bin/env bash

# === preliminary installs ===
# TODO: Run installs on yarn
yarn global add lerna
cd dpopp # TODO - maybe not needed?
lerna bootstrap # TODO - figure out how to speed this up if run in docker

# === start up ceramic in background ===
# TODO - how to kill this ceramic process at the end?
echo "Starting up Ceramic..."
(yarn workspace @dpopp/schemas ceramic &) | grep -q "Ceramic API running on"

# TODO alternatively figure out how to save the PID and kill at the end
# CERAMIC_PID = $(ceramic daemon)
# echo $CERAMIC_PID

# TODO - not needed once we publish + persist our schemas to ceramic testnet
# === create & publish model to ceramic ===
yarn workspace @dpopp/schemas create-model
yarn workspace @dpopp/schemas publish-model

# === run ceramic integration tests ===
yarn workspace @dpopp/database-client test:integration # && kill -9 $CERAMIC_PID
14 changes: 14 additions & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
version: "3.9"
services:
# ceramic-daemon:
# image: ceramicnetwork/go-ipfs-daemon:latest
# ports:
# - "5001:5001"
# - "8011:8011"
ceramic-integration-test:
image: node:16
volumes:
- ./:/dpopp
- ./node_modules:/dpopp/node_modules
entrypoint:
["sh", "/dpopp/database-client/integration-tests/run-ceramic-tests.sh"]
1 change: 0 additions & 1 deletion iam/src/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ import { app } from "./index";

// default port to listen on
const port = 80;
// TODO support 443 for https

// start the Express server
app.listen(port, () => {
Expand Down

0 comments on commit 27e4582

Please sign in to comment.