-
Notifications
You must be signed in to change notification settings - Fork 53
121 lines (103 loc) · 3.86 KB
/
test.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
name: Test
on:
push:
branches:
- 'master'
- 'release*'
env:
DEBIAN_FRONTEND: noninteractive
RUST_VERSION: nightly-2023-08-24
jobs:
linters:
name: Tests
concurrency:
group: tests-${{ github.ref }}
cancel-in-progress: true
container:
image: ubuntu:jammy
env:
BUILD_DIR: /home/ghr/_work/_temp
RUST_LOG: hyperspace=trace,hyperspace_parachain=trace
volumes:
- /home/ghr/_work/_temp:/home/ghr/_work/_temp
runs-on:
- self-hosted
- x64-monster
timeout-minutes: 300
steps:
- name: Install git
run: |
apt update -y
apt install git -y
git --version
whoami
uname -a
- uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Setup deps
run: |
git config --global --add safe.directory /__w/centauri/centauri
apt update -y
apt install -y \
curl \
netcat \
iproute2 \
gcc \
g++ \
build-essential \
clang \
libclang-dev \
pkg-config \
libssl-dev \
unzip \
net-tools
netstat -ltup | grep LISTEN
# Get Rust
curl https://sh.rustup.rs -sSf | bash -s -- -y
$HOME/.cargo/bin/rustup toolchain install ${{ env.RUST_VERSION }}
$HOME/.cargo/bin/rustup target add wasm32-unknown-unknown --toolchain ${{ env.RUST_VERSION }}
$HOME/.cargo/bin/rustup component add rustfmt --toolchain ${{ env.RUST_VERSION }}
$HOME/.cargo/bin/rustup component add rustfmt
$HOME/.cargo/bin/rustup default ${{ env.RUST_VERSION }}
echo "$HOME/.cargo/bin" >> $GITHUB_PATH
- name: Rustup show
run: $HOME/.cargo/bin/rustup show
- name: Install zombienet
run: |
curl -L https://github.com/paritytech/zombienet/releases/download/v1.3.67/zombienet-linux-x64 -o /usr/bin/zombienet && \
chmod +x /usr/bin/zombienet
- name: Install process compose
run: |
curl -L https://github.com/F1bonacc1/process-compose/releases/download/v0.60.0/process-compose_Linux_x86_64.tar.gz -o /tmp/process-compose_Linux_x86_64.tar.gz && \
tar xvfz /tmp/process-compose_Linux_x86_64.tar.gz && \
mv process-compose /usr/bin/process-compose && \
chmod +x /usr/bin/process-compose
- name: Install Protoc
uses: arduino/setup-protoc@v1
with:
version: '3.x'
- name: Install latest nextest release
uses: taiki-e/install-action@nextest
- name: Install polkadot binary
run: |
curl -L https://github.com/paritytech/polkadot/releases/download/v0.9.43/polkadot -o /usr/bin/polkadot && \
chmod +x /usr/bin/polkadot
- name: Install parachain node
run: |
# curl -L http://34.70.93.30/parachain-node -o ./target/release/parachain-node
cargo build -p parachain-node --release
cp ./target/release/parachain-node /usr/bin/parachain-node
chmod +x /usr/bin/parachain-node
- name: Run local parachain cluster & Tests
run: |
export PARA_HOST=127.0.0.1
cd scripts/zombienet
process-compose up -f process-compose.yml -t=false &
sleep 100
netstat -ltup | grep LISTEN
export RUST_BACKTRACE=full
RUST_BACKTRACE=full METRICS_PORT=39988 ./wait-for-parachains-network.sh
RUST_BACKTRACE=full METRICS_PORT=39998 ./wait-for-parachains-network.sh
# SKIP_WASM_BUILD=1 cargo +${{ env.RUST_VERSION }} nextest run --locked --release --workspace --exclude ibc-derive --exclude hyperspace-testsuite
RUST_BACKTRACE=full cargo +${{ env.RUST_VERSION }} test -p hyperspace-testsuite --locked