-
Notifications
You must be signed in to change notification settings - Fork 6
64 lines (54 loc) · 1.69 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
name: E2E Tests
on:
push:
branches:
- 'main'
- 'release/*'
workflow_dispatch:
pull_request_review:
types: [submitted]
jobs:
e2e-tests:
runs-on:
group: laos
labels: ubuntu-16-cores
if: ${{ github.event_name != 'pull_request_review' || github.event.review.state == 'approved' }}
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: 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
export ZOMBIENET_ASSETHUB_COMMAND=./tmp/polkadot-parachain
./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 dependencies
run: |
npm install
working-directory: ./e2e-tests
- name: Run e2e tests
run: |
npm run build && npm run test
working-directory: ./e2e-tests