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 5a92a43
Show file tree
Hide file tree
Showing 3 changed files with 34 additions and 9 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
26 changes: 25 additions & 1 deletion .github/workflows/liquidation.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,31 @@ jobs:
run: yarn install

- name: Start subql indexer
run: yarn dev:ci
env:
AGORIC_NET: local
run: yarn dev

- name: Print initial logs of all containers
if: failure()
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: |
Expand Down
3 changes: 1 addition & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,7 @@
"build": "subql build",
"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": "subql codegen && 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",
Expand Down

0 comments on commit 5a92a43

Please sign in to comment.