-
Notifications
You must be signed in to change notification settings - Fork 334
149 lines (148 loc) · 4.71 KB
/
ci-default.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
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
name: Continuous Integration (Default Checks)
on:
workflow_call:
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: checkout repo from current commit
uses: actions/checkout@v4
- name: Set up Go
uses: actions/setup-go@v4
with:
go-version-file: go.mod
cache-dependency-path: |
go.sum
tests/e2e/kvtool/go.sum
- name: build application
run: make build
test:
runs-on: ubuntu-latest
steps:
- name: checkout repo from current commit
uses: actions/checkout@v4
with:
submodules: true
- name: Set up Go
uses: actions/setup-go@v4
with:
go-version-file: go.mod
cache-dependency-path: |
go.sum
tests/e2e/kvtool/go.sum
- name: run unit tests
run: make test
- name: run e2e tests
run: make docker-build test-e2e
test-e2e-evm:
runs-on: ubuntu-latest
env:
KAVA_TAG: local
steps:
- name: Checkout current commit
uses: actions/checkout@v4
with:
submodules: true
- name: Setup nodejs
uses: actions/setup-node@v3
with:
cache: npm
node-version-file: .tool-versions
cache-dependency-path: tests/e2e-evm/package-lock.json
- name: Setup Go
uses: actions/setup-go@v4
with:
go-version-file: go.mod
cache-dependency-path: |
go.sum
tests/e2e/kvtool/go.sum
- name: Install npm dependencies
run: npm install
working-directory: tests/e2e-evm
- name: Run test suite against hardhat network
run: npm run compile
working-directory: tests/e2e-evm
- name: Run test suite against hardhat network
run: npm run test-hardhat
working-directory: tests/e2e-evm
- name: Build local image
run: make docker-build
- name: Install kvtool
run: make -C tests/e2e/kvtool install
- name: Generate kava config
run: kvtool testnet gen-config kava --kava.configTemplate $(sed -nr "s/E2E_KVTOOL_KAVA_CONFIG_TEMPLATE=\"(.*)\"/\1/p" tests/e2e/.env)
- name: Start kava chain
run: kvtool testnet up -d
- name: Wait for JSON RPC to start
run: "curl --retry-all-errors --retry 12 --retry-delay 5 -X POST -H \"Content-Type: application/json\" http://127.0.0.1:8545"
- name: Run test suite against kvtool network
run: npm run test-kvtool
working-directory: tests/e2e-evm
- name: Shutdown kava
if: always()
run: kvtool testnet down
fuzz:
runs-on: ubuntu-latest
steps:
- name: checkout repo from current commit
uses: actions/checkout@v4
with:
submodules: true
- name: Set up Go
uses: actions/setup-go@v4
with:
go-version-file: go.mod
cache-dependency-path: |
go.sum
- name: run fuzz tests
run: make test-fuzz
ibc-test:
runs-on: ubuntu-latest
steps:
- name: checkout repo from current commit
uses: actions/checkout@v4
- name: Set up Go
uses: actions/setup-go@v5
with:
go-version-file: tests/e2e-ibc/go.mod
cache-dependency-path: |
tests/e2e-ibc/go.sum
go.sum
- name: run ibc e2e tests
run: make test-ibc
validate-internal-testnet-genesis:
runs-on: ubuntu-latest
steps:
- name: checkout repo from current commit
uses: actions/checkout@v4
- name: save version of kava that will be deployed if this pr is merged
id: kava-version
run: |
echo "KAVA_VERSION=$(cat ./ci/env/kava-internal-testnet/KAVA.VERSION)" >> $GITHUB_OUTPUT
- name: checkout version of kava that will be deployed if this pr is merged
uses: actions/checkout@v4
with:
ref: ${{ steps.kava-version.outputs.KAVA_VERSION }}
- name: Set up Go
uses: actions/setup-go@v4
with:
go-version-file: go.mod
- name: build kava cli
run: make install
- name: checkout repo from current commit to validate current branch's genesis
uses: actions/checkout@v4
- name: validate testnet genesis
run: kava validate-genesis ci/env/kava-internal-testnet/genesis.json
validate-protonet-genesis:
runs-on: ubuntu-latest
steps:
- name: checkout repo from current commit
uses: actions/checkout@v4
- name: Set up Go
uses: actions/setup-go@v4
with:
go-version-file: go.mod
- name: build kava cli
run: make install
- name: validate protonet genesis
run: kava validate-genesis ci/env/kava-protonet/genesis.json