diff --git a/.github/actions/getActiveVaults/action.yml b/.github/actions/getActiveVaults/action.yml index 95607c9c..7d9d48f1 100644 --- a/.github/actions/getActiveVaults/action.yml +++ b/.github/actions/getActiveVaults/action.yml @@ -20,10 +20,11 @@ runs: - name: Fetch Active Vaults shell: bash run: | - result=$(curl -s -X POST "${{ inputs.apiUrl }}" \ - -H 'Content-Type: application/json' \ - -H 'Accept: application/json' \ - --data-raw '{"query":"query { vaults(filter: {state: {equalTo: \\"active\\"}}) { totalCount } }"}') + sleep 360 + result=$(curl -s -X POST http://localhost:3000/ \ + -H 'Content-Type: application/json' \ + -H 'Accept: application/json' \ + --data-raw '{"query":"query { vaults(filter: {state: {equalTo: \"active\"}}) { totalCount } }"}') activeVaults=$(echo $result | jq -r '.data.vaults.totalCount') @@ -35,9 +36,10 @@ runs: shell: bash run: | if [[ "${{ steps.fetch.outputs.activeVaults }}" -eq "${{ inputs.expectedVaults }}" ]]; then - echo "Assertion passed: The number of active vaults (${steps.fetch.outputs.activeVaults}}) matches the expected value (${inputs.expectedVaults})." + echo "Assertion passed: The number of active vaults (${{ steps.fetch.outputs.activeVaults }}) matches the expected value (${{ inputs.expectedVaults }})." echo "::set-output name=assertionResult::passed" else - echo "Assertion failed: The number of active vaults (${steps.fetch.outputs.activeVaults}}) does not match the expected value (${inputs.expectedVaults})." + echo "Assertion failed: The number of active vaults (${{ steps.fetch.outputs.activeVaults }}) does not match the expected value (${{ inputs.expectedVaults }})." echo "::set-output name=assertionResult::failed" exit 1 + fi diff --git a/.github/workflows/liquidation.yml b/.github/workflows/liquidation.yml index ff188931..bea25a21 100644 --- a/.github/workflows/liquidation.yml +++ b/.github/workflows/liquidation.yml @@ -26,6 +26,27 @@ jobs: - name: Start subql indexer run: yarn dev:ci + - name: Print initial logs of all containers + run: | + echo "Fetching initial logs for all containers..." + containers=$(docker ps --format '{{.ID}}') + for container in $containers; do + echo "Fetching initial logs for container $container..." + docker logs $container + done + + - name: Wait for 2 minutes + run: sleep 120 + + - name: Print logs after 2 minutes for all containers + run: | + echo "Fetching logs after 2 minutes for all containers..." + containers=$(docker ps --format '{{.ID}}') + for container in $containers; do + echo "Fetching logs after 2 minutes for container $container..." + docker logs $container + done + - name: Set ATOM Price to 12.34 run: | docker exec a3p /usr/src/agoric-sdk/packages/agoric-cli/bin/agops oracle setPrice --keys gov1,gov2 --pair ATOM.USD --price 12.34 --keyring-backend=test diff --git a/package.json b/package.json index e9c7ec51..7b83cd8f 100644 --- a/package.json +++ b/package.json @@ -8,7 +8,7 @@ "codegen": "subql codegen", "start:docker": "docker-compose pull && docker-compose up --remove-orphans", "dev": "subql codegen && subql build && docker-compose pull && docker-compose up --remove-orphans", - "dev:ci": "AGORIC_NET=docker subql codegen && subql build && docker compose pull && docker compose up --remove-orphans --detach", + "dev:ci": "subql codegen && AGORIC_NET=docker subql build && docker compose pull && docker compose up --remove-orphans --detach", "prepack": "rm -rf dist && npm run build", "test": "subql build && subql-node-cosmos test", "prettier:check": "prettier --list-different . --print-width 120",