-
Notifications
You must be signed in to change notification settings - Fork 0
91 lines (70 loc) · 2.72 KB
/
Copy pathci.yml
File metadata and controls
91 lines (70 loc) · 2.72 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
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
name: ci
on:
push:
branches: [main]
pull_request:
workflow_dispatch:
env:
CARGO_TERM_COLOR: always
jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
with:
components: clippy, rustfmt
- name: Install protoc
run: sudo apt-get install -y protobuf-compiler
- name: Check formatting
run: cargo fmt --all --check
- name: Clippy
run: cargo clippy --all-targets -- -W clippy::all
- name: Run all tests
run: cargo test --all-targets
- name: Run integration tests
run: cargo test --test memo_merkle_test
tools:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
- name: Install protoc
run: sudo apt-get install -y protobuf-compiler
- uses: actions/setup-python@v5
with:
python-version: "3.12"
- name: Audit proof bundle
run: cargo run --quiet --bin zap1_audit -- --bundle examples/live_ownership_attest_proof.json
- name: Schema validator
run: cargo run --quiet --bin zap1_schema -- --witness examples/schema_witness.json
- name: Schema validator JSON output
run: cargo run --quiet --bin zap1_schema -- --witness examples/schema_witness.json --json
- name: ZIP 302 TVLV roundtrip
run: |
memo_hex=$(cargo run --quiet --bin zip302_tvlv -- encode examples/zip302_parts_example.json | tail -n 1)
cargo run --quiet --bin zip302_tvlv -- decode "$memo_hex"
- name: Operator status (green fixture)
run: cargo run --quiet --bin zap1_ops -- --from-dir examples/zap1_ops_fixture --json
- name: Operator status (must fail on critical fixture)
run: |
if cargo run --quiet --bin zap1_ops -- --from-dir examples/zap1_ops_fixture_critical --json; then
echo "expected failure on critical fixture"
exit 1
fi
- name: Operator status unit tests
run: cargo test --quiet --bin zap1_ops
- name: Liveness script compiles
run: python3 -m py_compile scripts/check_anchor_liveness.py
- name: Conformance protocol checks
run: python3 conformance/check.py
- name: Compatibility vectors
run: python3 scripts/check_compatibility.py
- name: Verify export package offline
run: cargo run --quiet --bin zap1_audit -- --export conformance/valid_export.json
- name: Reject invalid bundle
run: |
if cargo run --quiet --bin zap1_audit -- --bundle conformance/invalid_bundle.json 2>/dev/null; then
echo "expected failure on invalid bundle"
exit 1
fi