-
Notifications
You must be signed in to change notification settings - Fork 3
43 lines (42 loc) · 1.4 KB
/
compile.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
name: Smoke Tests
on: [push]
jobs:
compile-run-node:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Install jq and curl
run: sudo apt-get update && sudo apt-get install -y jq curl make
- name: Compile runtime
run: bash .github/workflows/scripts/compile.sh
- name: Run the node and insert Aura keys
run: |
make run-node \
NAME=node01 \
PORT=30333 \
WS-PORT=9944 \
RPC-PORT=9933 \
spec=raw-chain-spec.json detached=1 \
&& bash .github/workflows/scripts/insert-keys.sh \
&& docker restart node01
- name: Sleep for 10 seconds
uses: jakejarvis/wait-action@master
with:
time: '10s'
- name: Get latest header
id: check-header
run: |
docker start node01 \
&& echo "::set-output name=tx-output::$(bash .github/workflows/scripts/get-latest-header.sh)\n"
- name: |
Check the latest header
If it contains number":"0x0",
it means no block was produced except the genesis
env:
TX_RESULT: ${{steps.check-header.outputs.tx-output}}
run: |
if [[ $TX_RESULT == *"number":"0x0"* ]]; then \
exit 1; \
else \
exit 0; \
fi \