-
Notifications
You must be signed in to change notification settings - Fork 8
96 lines (94 loc) · 2.92 KB
/
ibc-test.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
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
name: IBC test
on:
pull_request:
paths:
- .github/workflows/ibc-test.yaml
- Cargo.toml
- Cargo.lock
- ci/**
- crates/**
- tools/**
push:
branches: main
- .github/workflows/ibc-test.yaml
- Cargo.toml
- Cargo.lock
- ci/**
- crates/**
- tools/**
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true
jobs:
ibc-test:
runs-on: ubuntu-20.04
timeout-minutes: 60
env:
SRC_DIR: ./tmp/ibc-test-src
strategy:
fail-fast: false
matrix:
chain_a:
- command: ckb
account_prefix: ckb
- command: axon
account_prefix: axon
chain_b:
- command: ckb
account_prefix: ckb
- command: axon
account_prefix: axon
steps:
- uses: actions/checkout@v3
- uses: actions-rs/toolchain@v1
with:
toolchain: stable
override: true
- uses: Swatinem/rust-cache@v1
- uses: actions-rs/cargo@v1
with:
command: build
args: -p ibc-relayer
- name: Prepare CKB
run: |
if [ ! -f "/tmp/ckb.tar.gz" ]; then
curl -L https://github.com/nervosnetwork/ckb/releases/download/v0.107.0/ckb_v0.107.0_x86_64-unknown-linux-gnu.tar.gz -o /tmp/ckb.tar.gz
fi
tar -zxf /tmp/ckb.tar.gz -C /tmp
echo "/tmp/ckb_v0.107.0_x86_64-unknown-linux-gnu" >> $GITHUB_PATH
- name: Create folder
run: mkdir -p $SRC_DIR
- name: Prepare Axon source
run: git clone -b forcerelay-test --single-branch --recursive https://github.com/axonweb3/axon.git $SRC_DIR/axon
- name: Install Axon
uses: actions-rs/cargo@v1
with:
command: install
args: --path ${{env.SRC_DIR}}/axon
- name: Prepare IBC contracts
run: git clone --recursive https://github.com/synapseweb3/ibc-solidity-contract.git $SRC_DIR/ibc-solidity-contract
- name: Set Node.js 16.x
uses: actions/setup-node@v3
with:
node-version: 16.x
- name: Run install
uses: borales/actions-yarn@v4
with:
cmd: install
dir: ${{env.SRC_DIR}}/ibc-solidity-contract
- name: Run install
uses: borales/actions-yarn@v4
with:
cmd: compile
dir: ${{env.SRC_DIR}}/ibc-solidity-contract
- uses: actions-rs/cargo@v1
env:
CHAIN_COMMAND_PATHS: ${{ matrix.chain_a.command }},${{ matrix.chain_b.command }}
ACCOUNT_PREFIXES: ${{ matrix.chain_a.account_prefix }},${{ matrix.chain_b.account_prefix }}
AXON_SRC_PATH: ${{env.SRC_DIR}}/axon
IBC_CONTRACTS_SRC_PATH: ${{env.SRC_DIR}}/ibc-solidity-contract
RUST_LOG: info
RUST_BACKTRACE: 1
with:
command: test
args: -p ibc-test --all-features -- --nocapture