-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
CI test using a3p #31
Merged
Merged
Changes from all commits
Commits
Show all changes
27 commits
Select commit
Hold shift + click to select a range
a827591
chore: gitignore for aider
turadg f8dc610
chore(deps): bump subql deps
turadg 2f09e6a
chore(deps): rm unused
turadg 9923514
feat: AGORIC_NET env option
turadg 7c30fde
ci: Rename PR workflow job from 'pr' to 'test'
turadg 4a07e02
ci: Add a3p container service to GitHub Actions workflow
turadg 3c298f4
ci: subql-node-cosmos test
turadg 51a3001
feat: parameterize startBlock
turadg b8d18ab
test: a3p
turadg ff4fe8b
test: update tests
turadg d6802ca
test: update tests
rabi-siddique 903008e
chore: remove encoding/decoding
rabi-siddique ac00815
test: add tests for vault and reserve entities
rabi-siddique c9738e7
test: add tests for boardaux, oraclePriceDaily and PsmMetricsDaily
rabi-siddique 59c6dba
test: bundle install test
frazarshad c7ea1fe
test: psmMetrics, psmGovernance, oraclePrice tests added
frazarshad 6ed47f2
fix: casting value to bigint
frazarshad 43b7c8b
chore: prettier
frazarshad 4913583
test: disabled vault manager tests
frazarshad cc0d163
ci: initial setup for liquidation testing
rabi-siddique fef6f99
ci: set ATOM price and create vaults
rabi-siddique 300bdee
ci: place bids and set ATOM price to 9.99
rabi-siddique e308f84
ci: get active vaults
rabi-siddique 7996f70
ci: validate liquidating vaults
rabi-siddique c23d4c8
ci: set execute permission for all .mjs files in scripts
rabi-siddique 6ddb269
chore(deps): install ses
rabi-siddique 470125a
ci: validate vault and reserve metrics data
rabi-siddique File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,130 @@ | ||
name: Liquidation Indexing | ||
on: | ||
pull_request: | ||
|
||
jobs: | ||
test: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
|
||
- name: Start A3P container | ||
run: docker compose --profile ci up -d a3p | ||
|
||
- run: corepack enable | ||
shell: bash | ||
|
||
- name: Setup Node.js environment | ||
uses: actions/setup-node@v4 | ||
with: | ||
node-version: 18 | ||
cache: yarn | ||
|
||
- name: Install dependencies | ||
run: yarn install | ||
|
||
- name: Start subql indexer | ||
env: | ||
AGORIC_NET: ci | ||
run: yarn dev | ||
|
||
- 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: Set ATOM Price to 12.34 | ||
run: ./scripts/changePrice.mjs | ||
env: | ||
amount: 12.34 | ||
containerName: agd | ||
AGORIC_NET: local | ||
|
||
- name: Get active vaults | ||
run: ./scripts/getActiveVaults.mjs | ||
env: | ||
expectedVaults: 7 | ||
|
||
- name: Create Vault with 100 Minted and 15 Collateral | ||
run: ./scripts/createVault.mjs | ||
env: | ||
wantMinted: '100' | ||
giveCollateral: '15' | ||
userKey: 'gov3' | ||
AGORIC_NET: 'local' | ||
commandTimeout: '120' | ||
containerName: 'agd' | ||
|
||
- name: Create Vault with 103 Minted and 15 Collateral | ||
run: ./scripts/createVault.mjs | ||
env: | ||
wantMinted: '103' | ||
giveCollateral: '15' | ||
userKey: 'gov3' | ||
AGORIC_NET: 'local' | ||
commandTimeout: '120' | ||
containerName: 'agd' | ||
|
||
- name: Create Vault with 105 Minted and 15 Collateral | ||
run: ./scripts/createVault.mjs | ||
env: | ||
wantMinted: '105' | ||
giveCollateral: '15' | ||
userKey: 'gov3' | ||
AGORIC_NET: 'local' | ||
commandTimeout: '120' | ||
containerName: 'agd' | ||
|
||
- name: Get active vaults | ||
run: ./scripts/getActiveVaults.mjs | ||
env: | ||
expectedVaults: 10 | ||
|
||
- name: Place bid for 90IST | ||
run: ./scripts/placeBid.mjs | ||
env: | ||
fromAddress: 'gov1' | ||
giveAmount: '90IST' | ||
priceOrDiscount: '9' | ||
commandType: 'by-price' | ||
AGORIC_NET: 'local' | ||
containerName: 'agd' | ||
|
||
- name: Place bid for 80IST | ||
run: ./scripts/placeBid.mjs | ||
env: | ||
fromAddress: 'gov1' | ||
giveAmount: '80IST' | ||
priceOrDiscount: '10' | ||
commandType: 'by-discount' | ||
AGORIC_NET: 'local' | ||
containerName: 'agd' | ||
|
||
- name: Place bid for 150IST | ||
run: ./scripts/placeBid.mjs | ||
env: | ||
fromAddress: 'gov1' | ||
giveAmount: '150IST' | ||
priceOrDiscount: '15' | ||
commandType: 'by-discount' | ||
AGORIC_NET: 'local' | ||
containerName: 'agd' | ||
|
||
- name: Set ATOM Price to 9.99 | ||
run: ./scripts/changePrice.mjs | ||
env: | ||
amount: 9.99 | ||
containerName: agd | ||
AGORIC_NET: local | ||
|
||
- name: Check liquidation indexing | ||
run: ./scripts/checkLiquidation.mjs | ||
|
||
- name: Get active vaults | ||
run: ./scripts/getActiveVaults.mjs | ||
env: | ||
expectedVaults: 7 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,79 @@ | ||
name: Vaults and Reserve Indexing | ||
on: | ||
pull_request: | ||
|
||
jobs: | ||
test: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
|
||
- name: Start A3P container | ||
run: docker compose --profile ci up -d a3p | ||
|
||
- run: corepack enable | ||
shell: bash | ||
|
||
- name: Setup Node.js environment | ||
uses: actions/setup-node@v4 | ||
with: | ||
node-version: 18 | ||
cache: yarn | ||
|
||
- name: Install dependencies | ||
run: yarn install | ||
|
||
- name: Start subql indexer | ||
env: | ||
AGORIC_NET: ci | ||
run: yarn dev | ||
|
||
- 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 | ||
|
||
# We tried delays of 10, 20, and 30 seconds, but a 60-second delay is the most efficient | ||
# and ensures that the server is fully ready, without causing any issues. | ||
- name: Wait for GraphQL server | ||
run: sleep 60 | ||
|
||
- name: Test VaultManagerGovernance | ||
run: ./scripts/validateData.mjs | ||
env: | ||
entity: vaultManagerGovernances | ||
blockHeight: 1212 | ||
|
||
- name: Test VaultManagerMetrics | ||
run: ./scripts/validateData.mjs | ||
env: | ||
entity: vaultManagerMetrics | ||
blockHeight: 1212 | ||
|
||
- name: Test VaultManagerMetricsDaily | ||
run: ./scripts/validateData.mjs | ||
env: | ||
entity: vaultManagerMetricsDailies | ||
blockHeight: 1212 | ||
|
||
- name: Test ReserveMetrics | ||
run: ./scripts/validateData.mjs | ||
env: | ||
entity: reserveMetrics | ||
blockHeight: 1212 | ||
|
||
- name: Test ReserveAllocationMetrics | ||
run: ./scripts/validateData.mjs | ||
env: | ||
entity: reserveAllocationMetrics | ||
blockHeight: 1212 | ||
|
||
- name: Test ReserveAllocationMetricsDaily | ||
run: ./scripts/validateData.mjs | ||
env: | ||
entity: reserveAllocationMetricsDailies | ||
blockHeight: 1212 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -62,3 +62,5 @@ Thumbs.db | |
!.yarn/releases | ||
!.yarn/sdks | ||
!.yarn/versions | ||
.aider* | ||
.env |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -7,7 +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": "subql codegen && subql build && docker compose pull && docker compose --profile default 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", | ||
|
@@ -23,23 +23,28 @@ | |
"author": "Agoric OpCo", | ||
"license": "Apache-2.0", | ||
"devDependencies": { | ||
"@agoric/internal": "0.4.0-u18.0", | ||
"@cosmjs/stargate": "^0.28.9", | ||
"@subql/cli": "^5.3.3", | ||
"@endo/eventual-send": "^1.2.8", | ||
"@subql/cli": "^5.4.0", | ||
"@subql/node-cosmos": "^4.2.1", | ||
"@subql/testing": "latest", | ||
"execa": "^9.5.2", | ||
"prettier": "^3.4.2", | ||
"ses": "^1.10.0", | ||
"starknet": "6.11.0", | ||
"typescript": "^5.7.2" | ||
}, | ||
"dependencies": { | ||
"@subql/types-cosmos": "^4.0.0", | ||
"@subql/utils": "^2.16.0", | ||
"@subql/utils": "^2.17.0", | ||
"@types/node": "^17.0.21", | ||
"bech32": "^2.0.0", | ||
"js-sha256": "^0.11.0", | ||
"pino": "^7.8.0", | ||
"ts-proto": "^1.112.1", | ||
"tslib": "^2.3.1" | ||
"pino": "^7.8.0" | ||
}, | ||
"resolutions": { | ||
"@subql/node-core": "^16.1.0" | ||
}, | ||
"packageManager": "[email protected]" | ||
} |
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
just until subquery/subql-cosmos#302