Repository navigation
52 lines (51 loc) · 1.93 KB
/
Copy pathtask-test-cli.yml
File metadata and controls
52 lines (51 loc) · 1.93 KB
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
---
# yaml-language-server: $schema=https://raw.githubusercontent.com/SchemaStore/schemastore/refs/heads/master/src/schemas/json/github-workflow.json
name: Task - Run CLI tests
on:
workflow_dispatch:
inputs:
madara-binary-hash:
description: "Hash used to retrieve the madara binary artifact"
required: true
type: string
workflow_call:
inputs:
madara-binary-hash:
description: "Hash used to retrieve the madara binary artifact"
required: true
type: string
permissions:
contents: read
jobs:
test-cli:
runs-on: blacksmith-4vcpu-ubuntu-2204
steps:
- name: Checkout Repository
uses: actions/checkout@v5
with:
submodules: recursive
- name: Load env
uses: ./.github/actions/load-env
- name: Download Madara binary
uses: actions/download-artifact@v7
with:
name: madara-binary-${{ inputs.madara-binary-hash }}
path: target/release/
- name: Make Madara binary executable
run: chmod +x target/release/madara
- name: Run cli without arguments
timeout-minutes: 20
run: |
./target/release/madara --no-l1-sync --devnet &
MADARA_PID=$!
while ! curl -s -X POST http://localhost:9944 -H "Content-Type: application/json" -d '{"jsonrpc":"2.0","method":"starknet_chainId","params":[],"id":1}' | grep -q result; do sleep 1; done
kill $MADARA_PID
wait $MADARA_PID || true
- name: Run cli pointing to a file
timeout-minutes: 20
run: |
./target/release/madara --no-l1-sync --devnet --config-file ./configs/args/config.json &
MADARA_PID=$!
while ! curl -s -X POST http://localhost:9944 -H "Content-Type: application/json" -d '{"jsonrpc":"2.0","method":"starknet_chainId","params":[],"id":1}' | grep -q result; do sleep 1; done
kill $MADARA_PID
wait $MADARA_PID || true