forked from keep-starknet-strange/madara
-
Notifications
You must be signed in to change notification settings - Fork 0
47 lines (45 loc) · 1.34 KB
/
starknet-rpc-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
---
name: Task - Rpc Tests
on:
workflow_dispatch:
workflow_call:
jobs:
rpc-tests:
runs-on: ubuntu-latest
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
- uses: software-mansion/setup-scarb@v1
with:
scarb-version: "2.3.1"
- 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: Compile contracts for rpc-tests
run: |
cd starknet-rpc-test/contracts && ./generate_declare_contracts.sh 10
- name: Run rpc test with cache
run: |-
./target/production/madara --dev --sealing=manual &
MADARA_RUN_PID=$!
while ! echo exit | nc localhost 9944; do sleep 1; done
cd starknet-rpc-test
cargo test
kill $MADARA_RUN_PID