-
Notifications
You must be signed in to change notification settings - Fork 2
71 lines (53 loc) · 2.29 KB
/
CI.yaml
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
name: 'CI'
on:
pull_request:
branches: [master]
workflow_dispatch:
jobs:
test:
runs-on: ubuntu-22.04
steps:
- name: Cancel previous workflow runs
uses: styfle/[email protected]
with:
access_token: ${{ github.token }}
- uses: actions/checkout@v2
- name: Install NodeJS 18.x
uses: actions/setup-node@v3
with:
node-version: 18.x
- name: Download Gear node [release=build]
run: wget -O ./gear https://github.com/gear-tech/gear/releases/download/build/gear
- name: Build spec
run: |
chmod +x ./gear
./gear build-spec --dev > dev.json
- name: Install rosetta-cli tool
run: curl -sSfL https://raw.githubusercontent.com/coinbase/rosetta-cli/master/scripts/install.sh | sh -s
- name: Install dependencies
run: yarn install
- name: Build
run: yarn build
- name: Update balances
run: node ./test/set-prefunded-acc.js ./dev.json ./test/development/config.json
- name: Run Gear node
run: nohup ./gear --chain ./dev.json --validator --alice --tmp --pruning archive --unsafe-rpc-external --rpc-methods Unsafe --rpc-cors all &
- name: "Prepare: sleep"
run: sleep 180
- name: Make transfers
run: node ./test/make-transfers.js
- name: Update development config
run: node ./util/cli/app.js update config/rosetta/gear-development.json -a http://127.0.0.1:9944
- name: Run server in online mode
run: yarn start:dev --update-config &
- name: Run server in offline mode
run: yarn start:offline --update-config &
env:
PORT: 8090
- name: Run check:data
run: ./bin/rosetta-cli --configuration-file ./test/development/config.json check:data
- name: Find out the balance of the prefunded account
run: |
curl -L 'http://127.0.0.1:8080/account/balance' -H 'Content-Type: application/json' -d '{"account_identifier": {"address": "kGkfymFqB4aBVunXCW69EzQRDtkZkUQB44GB4XJnwNwqmWyRN"},"network_identifier": {"blockchain": "gear","network": "development"}}'
- name: Run check:construction
run: ./bin/rosetta-cli --configuration-file ./test/development/config.json check:construction