Skip to content

Commit

Permalink
debug
Browse files Browse the repository at this point in the history
  • Loading branch information
rabi-siddique committed Dec 17, 2024
1 parent a4504cb commit 1a0d7d3
Show file tree
Hide file tree
Showing 2 changed files with 29 additions and 6 deletions.
14 changes: 8 additions & 6 deletions .github/actions/getActiveVaults/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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')
Expand All @@ -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
21 changes: 21 additions & 0 deletions .github/workflows/liquidation.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 1a0d7d3

Please sign in to comment.