diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 18862d39..fde4a7b3 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -107,6 +107,11 @@ jobs: - name: Run Governance integration integration tests run: | docker exec -i subgraph-hardhat-node yarn workspace venus-governance-subgraph run test:integration --bail + + - name: Debug + if: always() + run: | + docker compose ps -q hardhat - name: Stop containers if: always() diff --git a/docker-compose.yaml b/docker-compose.yaml index a7bcee46..86784743 100644 --- a/docker-compose.yaml +++ b/docker-compose.yaml @@ -15,11 +15,11 @@ services: condition: service_started postgres: condition: service_started - healthcheck: - test: ["CMD", "curl", "-f", "http://graph-node:8000"] - interval: 30s - timeout: 12s - retries: 10 + # healthcheck: + # test: ["CMD", "curl", "-f", "http://graph-node:8000"] + # interval: 30s + # timeout: 12s + # retries: 10 environment: postgres_host: postgres postgres_user: graph-node @@ -38,7 +38,7 @@ services: - sh - -c - | - yarn &&PACKAGE=isolated-pools yarn workspace isolated-pools-subgraph run hardhat node --hostname 0.0.0.0 + yarn && PACKAGE=isolated-pools yarn workspace isolated-pools-subgraph run hardhat node --hostname 0.0.0.0 # Installing again to link workspaces ports: - 8545:8545 @@ -49,8 +49,8 @@ services: healthcheck: test: ["CMD", "node", "./hardhat-healthcheck.js"] interval: 30s - timeout: 12s - retries: 10 + timeout: 20s + retries: 20 ipfs: image: ipfs/go-ipfs:v0.4.23 ports: diff --git a/hardhat-healthcheck.js b/hardhat-healthcheck.js index 118cc3a3..b0f90250 100755 --- a/hardhat-healthcheck.js +++ b/hardhat-healthcheck.js @@ -4,9 +4,15 @@ * If node is up this function will silently succeed. If the node is down it will throw an error. */ async function healthCheck() { - const ethers = require('ethers'); - const localProvider = new ethers.providers.JsonRpcProvider(`http://hardhat:8545`) - localBlockNum = await localProvider.getBlockNumber(); + try { + const ethers = require('ethers'); + const localProvider = new ethers.providers.JsonRpcProvider(`http://hardhat:8545`) + localBlockNum = await localProvider.getBlockNumber(); + console.log(localBlockNum) + } catch (e) { + console.log(e) + throw e + } } module.export = healthCheck();