From 872f98dc86fe826dbf04b156f0ede1ca97b98b9e Mon Sep 17 00:00:00 2001 From: "Miao, ZhiCheng" Date: Wed, 28 Aug 2024 17:43:04 +0300 Subject: [PATCH] fix build --- .github/workflows/call.test-local-subgraph.yml | 6 ++++-- packages/subgraph/docker-compose.yml | 3 +-- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/.github/workflows/call.test-local-subgraph.yml b/.github/workflows/call.test-local-subgraph.yml index 117d6f36c5..e578711070 100644 --- a/.github/workflows/call.test-local-subgraph.yml +++ b/.github/workflows/call.test-local-subgraph.yml @@ -112,10 +112,12 @@ jobs: - name: Docker compose if: steps.base.outputs.cache-hit != 'true' run: | - docker compose up --force-recreate & + docker compose up --force-recreate --detach working-directory: ${{ env.subgraph-working-directory }} - name: Run subgraph integration test suite if: steps.base.outputs.cache-hit != 'true' - run: yarn test --network localhost + run: | + export DOCKER_HOST_GATEWAY_IP=$(docker network inspect bridge | jq -r '.[0].IPAM.Config[].Gateway) + yarn test --network localhost working-directory: ${{ env.subgraph-working-directory }} diff --git a/packages/subgraph/docker-compose.yml b/packages/subgraph/docker-compose.yml index ae595ddef6..770592d18d 100644 --- a/packages/subgraph/docker-compose.yml +++ b/packages/subgraph/docker-compose.yml @@ -8,7 +8,6 @@ services: - "8030:8030" - "8040:8040" depends_on: - - docker-host - ipfs - postgres extra_hosts: @@ -19,7 +18,7 @@ services: postgres_pass: let-me-in postgres_db: graph-node ipfs: "ipfs:5001" - ethereum: "mainnet:http://host.docker.internal:8545" + ethereum: "mainnet:http://${DOCKER_HOST_GATEWAY_IP}:8545" GRAPH_LOG: info ipfs: image: ipfs/go-ipfs:v0.4.23