Skip to content

Commit 1e42707

Browse files
committed
feat: create healthcheck and dependency in docker and make blockfrost-ryo default run
1 parent 5d9a3ac commit 1e42707

File tree

4 files changed

+12
-4
lines changed

4 files changed

+12
-4
lines changed

.github/workflows/continuous-integration-blockfrost-e2e.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ jobs:
7373
- name: 🌐 Setup local test network
7474
working-directory: packages/e2e
7575
run: |
76-
yarn local-network:blockfrost:up -d
76+
yarn local-network:up -d
7777
env:
7878
CARDANO_NODE_CHAINDB_LOG_LEVEL: 'Warning'
7979
CARDANO_NODE_LOG_LEVEL: 'Warning'

compose/common.yml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -131,6 +131,8 @@ services:
131131
condition: service_started
132132
ports:
133133
- "3015:3000"
134+
healthcheck:
135+
test: [ 'CMD-SHELL', 'curl -s --fail http://localhost:3000/health' ]
134136

135137
cardano-db-sync:
136138
<<:
@@ -348,8 +350,16 @@ services:
348350
<<:
349351
- *sdk-environment
350352
- *provider-server-environment
353+
NETWORK_INFO_PROVIDER: blockfrost
354+
REWARDS_PROVIDER: blockfrost
355+
UTXO_PROVIDER: blockfrost
356+
CHAIN_HISTORY_PROVIDER: blockfrost
357+
BLOCKFROST_CUSTOM_BACKEND_URL: 'http://blockfrost-ryo:3000'
351358
ports:
352359
- ${API_PORT:-4000}:3000
360+
depends_on:
361+
blockfrost-ryo:
362+
condition: service_healthy
353363

354364
stake-pool-provider-server:
355365
<<:

packages/e2e/docker-compose.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@ services:
1515
NODE_ENV: local-network
1616
volumes:
1717
- ./local-network/config/network/blockfrost-ryo:/app/config
18-
profiles: [blockfrost-ryo]
1918

2019
local-testnet:
2120
<<: *logging

packages/e2e/package.json

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,9 +46,8 @@
4646
"test:web-extension:watch": "run-s test:web-extension:build test:web-extension:watch:bg",
4747
"test:web-extension:watch:bg": "run-p test:web-extension:watch:build test:web-extension:watch:run",
4848
"test:ws": "jest -c jest.config.js --forceExit --selectProjects ws-server --runInBand --verbose",
49-
"local-network:common": "DISABLE_DB_CACHE=${DISABLE_DB_CACHE:-true} SUBMIT_API_ARGS='--testnet-magic 888' USE_BLOCKFROST=false __FIX_UMASK__=$(chmod -R a+r ../../compose/placeholder-secrets) docker compose --env-file ../cardano-services/environments/.env.local -p local-network-e2e -f docker-compose.yml -f ../../compose/common.yml -f ../../compose/$(uname -m).yml $FILES --profile ${DOCKER_COMPOSE_PROFILE:-none} up",
49+
"local-network:common": "DISABLE_DB_CACHE=${DISABLE_DB_CACHE:-true} SUBMIT_API_ARGS='--testnet-magic 888' USE_BLOCKFROST=false __FIX_UMASK__=$(chmod -R a+r ../../compose/placeholder-secrets) docker compose --env-file ../cardano-services/environments/.env.local -p local-network-e2e -f docker-compose.yml -f ../../compose/common.yml -f ../../compose/$(uname -m).yml $FILES up",
5050
"local-network:up": "FILES='' yarn local-network:common",
51-
"local-network:blockfrost:up": "FILES='' DOCKER_COMPOSE_PROFILE='blockfrost-ryo' yarn local-network:common",
5251
"local-network:single:up": "FILES='' yarn local-network:common cardano-node file-server local-testnet ogmios postgres",
5352
"local-network:profile:up": "FILES='-f ../../compose/pg-agent.yml' yarn local-network:common",
5453
"local-network:down": "docker compose -p local-network-e2e -f docker-compose.yml -f ../../compose/common.yml -f ../../compose/pg-agent.yml down -v --remove-orphans",

0 commit comments

Comments
 (0)