Skip to content

Commit 5a92a43

Browse files
committed
debug
1 parent a4504cb commit 5a92a43

File tree

3 files changed

+34
-9
lines changed

3 files changed

+34
-9
lines changed

.github/actions/getActiveVaults/action.yml

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -20,10 +20,11 @@ runs:
2020
- name: Fetch Active Vaults
2121
shell: bash
2222
run: |
23-
result=$(curl -s -X POST "${{ inputs.apiUrl }}" \
24-
-H 'Content-Type: application/json' \
25-
-H 'Accept: application/json' \
26-
--data-raw '{"query":"query { vaults(filter: {state: {equalTo: \\"active\\"}}) { totalCount } }"}')
23+
sleep 360
24+
result=$(curl -s -X POST http://localhost:3000/ \
25+
-H 'Content-Type: application/json' \
26+
-H 'Accept: application/json' \
27+
--data-raw '{"query":"query { vaults(filter: {state: {equalTo: \"active\"}}) { totalCount } }"}')
2728
2829
activeVaults=$(echo $result | jq -r '.data.vaults.totalCount')
2930
@@ -35,9 +36,10 @@ runs:
3536
shell: bash
3637
run: |
3738
if [[ "${{ steps.fetch.outputs.activeVaults }}" -eq "${{ inputs.expectedVaults }}" ]]; then
38-
echo "Assertion passed: The number of active vaults (${steps.fetch.outputs.activeVaults}}) matches the expected value (${inputs.expectedVaults})."
39+
echo "Assertion passed: The number of active vaults (${{ steps.fetch.outputs.activeVaults }}) matches the expected value (${{ inputs.expectedVaults }})."
3940
echo "::set-output name=assertionResult::passed"
4041
else
41-
echo "Assertion failed: The number of active vaults (${steps.fetch.outputs.activeVaults}}) does not match the expected value (${inputs.expectedVaults})."
42+
echo "Assertion failed: The number of active vaults (${{ steps.fetch.outputs.activeVaults }}) does not match the expected value (${{ inputs.expectedVaults }})."
4243
echo "::set-output name=assertionResult::failed"
4344
exit 1
45+
fi

.github/workflows/liquidation.yml

Lines changed: 25 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,31 @@ jobs:
2424
run: yarn install
2525

2626
- name: Start subql indexer
27-
run: yarn dev:ci
27+
env:
28+
AGORIC_NET: local
29+
run: yarn dev
30+
31+
- name: Print initial logs of all containers
32+
if: failure()
33+
run: |
34+
echo "Fetching initial logs for all containers..."
35+
containers=$(docker ps --format '{{.ID}}')
36+
for container in $containers; do
37+
echo "Fetching initial logs for container $container..."
38+
docker logs $container
39+
done
40+
41+
- name: Wait for 2 minutes
42+
run: sleep 120
43+
44+
- name: Print logs after 2 minutes for all containers
45+
run: |
46+
echo "Fetching logs after 2 minutes for all containers..."
47+
containers=$(docker ps --format '{{.ID}}')
48+
for container in $containers; do
49+
echo "Fetching logs after 2 minutes for container $container..."
50+
docker logs $container
51+
done
2852
2953
- name: Set ATOM Price to 12.34
3054
run: |

package.json

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,7 @@
77
"build": "subql build",
88
"codegen": "subql codegen",
99
"start:docker": "docker-compose pull && docker-compose up --remove-orphans",
10-
"dev": "subql codegen && subql build && docker-compose pull && docker-compose up --remove-orphans",
11-
"dev:ci": "AGORIC_NET=docker subql codegen && subql build && docker compose pull && docker compose up --remove-orphans --detach",
10+
"dev": "subql codegen && subql build && docker compose pull && docker compose up --remove-orphans --detach",
1211
"prepack": "rm -rf dist && npm run build",
1312
"test": "subql build && subql-node-cosmos test",
1413
"prettier:check": "prettier --list-different . --print-width 120",

0 commit comments

Comments
 (0)