forked from keep-starknet-strange/madara
-
Notifications
You must be signed in to change notification settings - Fork 6
53 lines (51 loc) · 1.51 KB
/
da-tests.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
---
name: Task - DA Tests
on:
workflow_dispatch:
workflow_call:
jobs:
rpc-tests:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
da-layer:
- ethereum
- celestia
- avail
env:
BINARY_PATH: ../target/production/madara
steps:
- uses: actions/checkout@v3
- uses: Swatinem/rust-cache@v2
with:
shared-key: "cache"
save-if: false
- uses: actions/cache@v3
with:
path: target/production/madara
key:
${{ runner.os }}-cargo-${{ hashFiles('Cargo.lock') }}-${{
github.run_id }}
fail-on-cache-miss: true
- name: Setup build deps
run: |
sudo apt-get update
sudo apt-get install -y clang llvm libudev-dev protobuf-compiler
- name: Setup dev chain
run: |
./target/production/madara setup --chain=dev --from-local=configs
- name: Run DA Layer
run: |
bash ./scripts/da_devnet.sh ${{ matrix.da_layer }}
- name: Run DA tests
run: |-
./target/production/madara --dev --da-layer ${{ matrix.da_layer }} --da-conf examples/da-confs/${{ matrix.da_layer }}.json &
MADARA_RUN_PID=$!
while ! echo exit | nc localhost 9944; do sleep 1; done
cd da-test
DA_LAYER=${{ matrix.da_layer }} cargo test
kill $MADARA_RUN_PID
- name: Stop DA Layer
run: |
bash ./scripts/stop_da_devnet.sh ${{ matrix.da_layer }}