-
Notifications
You must be signed in to change notification settings - Fork 4
107 lines (107 loc) · 2.81 KB
/
demo.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
name: Demo
on:
push:
branches:
- main
pull_request:
branches:
- main
jobs:
demo:
name: demo
runs-on: ubuntu-20.04
steps:
- name: Set up Go 1.16
uses: actions/setup-go@v1
with:
go-version: 1.16
- uses: actions/checkout@v2
- name: Cache go modules
uses: actions/cache@v2
with:
path: |
~/.cache/go-build
~/go/pkg/mod
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
restore-keys: |
${{ runner.os }}-go-
- name: Build Demo Environment
working-directory: demo
run: |
make build -j5
- name: Start Network
working-directory: demo
run: |
make network
- name: Run Init Demo
working-directory: demo
run: |
make run-init
- name: Run Demo
working-directory: demo
run: |
make run
- name: Run Alphacli Sample
working-directory: demo
run: |
make test-alphacli
- name: Run Betacli Sample
working-directory: demo
run: |
make test-betacli
golangci:
name: lint
runs-on: ubuntu-latest
steps:
- name: Set up Go 1.17
uses: actions/setup-go@v3
with:
go-version: 1.17
- uses: actions/checkout@v3
- name: golangci-lint for alpha cmds
uses: golangci/golangci-lint-action@v3
with:
version: v1.45.2
working-directory: cmds/alpha
- name: golangci-lint for beta cmds
uses: golangci/golangci-lint-action@v3
with:
version: v1.45.2
working-directory: cmds/beta
- name: golangci-lint for contract modules
uses: golangci/golangci-lint-action@v3
with:
version: v1.45.2
working-directory: contracts/erc20/
- name: golangci-lint for fabibc
uses: golangci/golangci-lint-action@v3
with:
version: v1.45.2
working-directory: demo/chains/fabric/chaincode/fabibc
- name: golangci-lint for simapp
uses: golangci/golangci-lint-action@v3
with:
version: v1.45.2
working-directory: demo/chains/tendermint
unit-test:
name: unit-test
runs-on: ubuntu-20.04
steps:
- name: Set up Go 1.16
uses: actions/setup-go@v2
with:
go-version: 1.16
- uses: actions/checkout@v2
- name: Cache go modules
uses: actions/cache@v2
with:
path: |
~/.cache/go-build
~/go/pkg/mod
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
restore-keys: |
${{ runner.os }}-go-
- name: Run Unit Test For contracts
working-directory: contracts/erc20/
run: |
make test