From 1a0d7d32bca26353f0e5ee2cefe8a2ddfe346282 Mon Sep 17 00:00:00 2001 From: rabi-siddique Date: Tue, 17 Dec 2024 16:39:53 +0500 Subject: [PATCH] debug --- .github/actions/getActiveVaults/action.yml | 14 ++++++++------ .github/workflows/liquidation.yml | 21 +++++++++++++++++++++ 2 files changed, 29 insertions(+), 6 deletions(-) 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