-
Notifications
You must be signed in to change notification settings - Fork 0
128 lines (110 loc) · 3.72 KB
/
liquidation.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
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: |
# docker exec agd /usr/src/agoric-sdk/packages/agoric-cli/bin/agops oracle setPrice --keys gov1,gov2 --pair ATOM.USD --price 12.34 --keyring-backend=test
# - name: Get active vaults
# uses: ./.github/actions/getActiveVaults
# with:
# apiUrl: 'http://localhost:3000/'
# expectedVaults: 7
- name: Set ATOM Price to 12.34
run: node .github/scripts/changePrice.mjs
env:
AMOUNT: 12.34
CONTAINER_NAME: agd
AGORIC_NET: local
- name: Create Vault with 100 Minted and 15 Collateral
run: node .github/scripts/createVault.mjs
env:
wantMinted: '100'
giveCollateral: '15'
userKey: 'gov3'
agoricNet: 'local'
commandTimeout: '120'
containerName: 'agd'
- name: Create Vault with 103 Minted and 15 Collateral
run: node .github/scripts/createVault.mjs
env:
wantMinted: '103'
giveCollateral: '15'
userKey: 'gov3'
agoricNet: 'local'
commandTimeout: '120'
containerName: 'agd'
- name: Create Vault with 105 Minted and 15 Collateral
run: node .github/scripts/createVault.mjs
env:
wantMinted: '105'
giveCollateral: '15'
userKey: 'gov3'
agoricNet: 'local'
commandTimeout: '120'
containerName: 'agd'
# - name: Get active vaults
# uses: ./.github/actions/getActiveVaults
# with:
# apiUrl: 'http://localhost:3000/'
# expectedVaults: 10
# - name: Place bid for 90IST
# uses: ./.github/actions/placeBid
# with:
# fromAddress: 'gov1'
# giveAmount: '90IST'
# priceOrDiscount: '9'
# commandType: 'by-price'
# agoricNet: 'local'
# commandTimeout: '120'
# containerName: 'agd'
# - name: Place bid for 80IST
# uses: ./.github/actions/placeBid
# with:
# fromAddress: 'gov1'
# giveAmount: '80IST'
# priceOrDiscount: '10'
# commandType: 'by-discount'
# agoricNet: 'local'
# commandTimeout: '120'
# containerName: 'agd'
# - name: Place bid for 150IST
# uses: ./.github/actions/placeBid
# with:
# fromAddress: 'gov1'
# giveAmount: '150IST'
# priceOrDiscount: '15'
# commandType: 'by-discount'
# agoricNet: 'local'
# commandTimeout: '120'
# containerName: 'agd'
# - name: Set ATOM Price to 9.99
# run: |
# docker exec agd /usr/src/agoric-sdk/packages/agoric-cli/bin/agops oracle setPrice --keys gov1,gov2 --pair ATOM.USD --price 9.99 --keyring-backend=test