-
Notifications
You must be signed in to change notification settings - Fork 5
185 lines (150 loc) · 4.36 KB
/
e2e.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
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
name: E2E Tests
on:
push:
workflow_dispatch:
jobs:
build:
runs-on:
group: laos
labels: ubuntu-16-cores
steps:
- uses: actions/checkout@v3
- uses: ./.github/actions/setup
- uses: ./.github/actions/cache
with:
cache-key: build_and_push
- name: Build
run: |
cargo build --release --locked
- name: Save LAOS binary
uses: actions/upload-artifact@v3
with:
name: laos-binary
path: ./target/release/laos
- name: Save LAOS runtime
uses: actions/upload-artifact@v3
with:
name: laos-runtime
path: ./target/release/wbuild/laos-runtime/laos_runtime.compact.compressed.wasm
lint:
runs-on:
group: laos
labels: ubuntu-16-cores
steps:
- uses: actions/checkout@v3
- uses: ./.github/actions/cache-npm
with:
cache-key: npm
- name: Use Node.js 18
uses: actions/setup-node@v3
with:
node-version: 18
- name: Install npm-dependencies
run: |
npm install
working-directory: ./e2e-tests
- name: Run lint
run: |
npm run fmt-check
working-directory: ./e2e-tests
zombie-tests:
needs: [build, lint]
runs-on:
group: laos
labels: ubuntu-16-cores
steps:
- uses: actions/checkout@v3
- uses: ./.github/actions/cache-npm
with:
cache-key: npm
- name: Download LAOS binary
uses: actions/download-artifact@v3
with:
name: laos-binary
path: ./target/release
- name: Give executable permissions to LAOS binary
run: |
chmod +x ./target/release/laos
- name: Download polkadot
run: |
chmod +x ./zombienet/download_polkadot.sh
./zombienet/download_polkadot.sh
- name: Copy zombienet binary
run: |
wget https://github.com/paritytech/zombienet/releases/download/v1.3.106/zombienet-linux-x64
chmod +x ./zombienet-linux-x64
- name: Run zombienet
run: |
export ZOMBIENET_RELAYCHAIN_COMMAND=./tmp/polkadot
export ZOMBIENET_LAOS_COMMAND=./target/release/laos
./zombienet-linux-x64 spawn ./zombienet/native.toml &
echo "Zombienet started"
- name: Wait for zombienet
run: |
timeout 36 sh -c 'until nc -z $0 $1; do echo -n .; sleep 1; done' localhost 9999
- name: Use Node.js 18
uses: actions/setup-node@v3
with:
node-version: 18
- name: Install npm-dependencies
run: |
npm install
working-directory: ./e2e-tests
- name: Npm build
run: |
npm run build
working-directory: ./e2e-tests
- name: Run evm tests
run: |
npm run test-evm
working-directory: ./e2e-tests
- name: Run contract deploy test
run: |
npm run test-deploy
working-directory: ./e2e-tests
chopsticks-tests:
needs: [build, lint]
runs-on:
group: laos
labels: ubuntu-16-cores
steps:
- uses: actions/checkout@v3
- uses: ./.github/actions/cache-npm
with:
cache-key: npm
- name: Download LAOS runtime
uses: actions/download-artifact@v3
with:
name: laos-runtime
path: ./target/release/wbuild/laos-runtime
- name: Use Node.js 18
uses: actions/setup-node@v3
with:
node-version: 18
- name: Install npm-dependencies
run: |
npm install
working-directory: ./e2e-tests
- name: Run chopsticks
run: |
npx @acala-network/chopsticks xcm \
-r polkadot \
-p laos \
-p chopsticks-configs/asset_hub.yml &
echo "Chopsticks started"
working-directory: ./e2e-tests
- name: Wait for chopsticks
run: |
timeout 36 sh -c 'until nc -z $0 $1; do echo -n .; sleep 1; done' localhost 8000
- name: Npm build
run: |
npm run build
working-directory: ./e2e-tests
- name: Run upgrade chain test
run: |
npm run test-upgrade-chain
working-directory: ./e2e-tests
- name: Run xcm tests
run: |
npm run test-xcm
working-directory: ./e2e-tests