-
Notifications
You must be signed in to change notification settings - Fork 3
67 lines (65 loc) · 2.22 KB
/
pr.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
name: CI
on:
pull_request:
jobs:
unit:
runs-on: ubuntu-latest
steps:
- name: Checkout Repo
uses: actions/checkout@v4
- name: Use Node.js 18
uses: actions/setup-node@v4
with:
node-version: '18'
- name: yarn install
run: yarn
- name: yarn lint
run: yarn lint
- name: yarn build
run: yarn build
- name: yarn test
run: yarn test
- name: yarn test:e2e
run: yarn test:e2e
integration:
runs-on: ubuntu-latest
steps:
- name: Checkout Repo
uses: actions/checkout@v4
- name: Use Node.js 18
uses: actions/setup-node@v4
with:
node-version: '18'
- name: yarn install
run: yarn
- name: yarn start:docker
run: yarn start:docker
- name: yarn build
run: yarn build
# Borrowed from https://github.com/DCFoundation/cosmos-proposal-builder/blob/main/.github/workflows/pr.yml#L43-L61
- name: Wait for Docker container to be ready
run: |
timeout 300 bash -c '
TARGET_HEIGHT=1111
SLEEP=10
echo "Waiting for the Agoric service to be fully ready..."
echo "Target block height: $TARGET_HEIGHT"
while true; do
response=$(curl --silent http://localhost:26657/abci_info);
height=$(echo $response | jq -r ".result.response.last_block_height | tonumber");
if [ "$height" -ge $TARGET_HEIGHT ]; then
echo "Service is ready! Last block height: $height";
break;
else
echo "Waiting for last block height to reach $TARGET_HEIGHT. Current height: $height";
fi;
sleep $SLEEP;
done
'
- name: yarn start:contract
run: yarn start:contract
- name: verify contracts started onchain
run: |
curl http://localhost:1317/agoric/vstorage/data/published.agoricNames.instance | grep sellConcertTickets
curl http://localhost:1317/agoric/vstorage/data/published.agoricNames.instance | grep swaparoo
curl http://localhost:1317/agoric/vstorage/data/published.agoricNames.instance | grep postalService