Skip to content

Commit 7c2f266

Browse files
Testclaude
andcommitted
feat: Phase 0 Sealing - GitHub Actions CI pipeline
Added automated testing workflow for Rust CLI and Lean 4 proofs: Rust CLI Job (ubuntu-latest): - Check formatting with cargo fmt --check - Run clippy with -D warnings (fail on any warnings) - Run all test suites separately (unit, integration, property) - Build release binary and verify it works - Cache dependencies with Swatinem/rust-cache Lean 4 Job (ubuntu-latest): - Install Lean 4 via elan (v4.12.0) - Build all proofs with lake build - Check for sorry placeholders (track proof completeness) Features: - Triggers on push/PR to impl/rust-cli/** or proofs/lean4/** - SHA-pinned actions following OpenSSF best practices - Separate jobs for Rust and Lean (parallel execution) - All test types run separately for clear failure reporting Actions used (all SHA-pinned): - actions/checkout@b4ffde65 (v4) - dtolnay/rust-toolchain@6d98179 (stable) - Swatinem/rust-cache@ad39774 (v2) Phase 0 Sealing: Component 5/6 complete Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
1 parent 2a829b9 commit 7c2f266

1 file changed

Lines changed: 92 additions & 0 deletions

File tree

.github/workflows/rust-cli.yml

Lines changed: 92 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,92 @@
1+
# SPDX-License-Identifier: AGPL-3.0-or-later
2+
name: Rust CLI Tests
3+
4+
on:
5+
push:
6+
paths:
7+
- 'impl/rust-cli/**'
8+
- 'proofs/lean4/**'
9+
- '.github/workflows/rust-cli.yml'
10+
pull_request:
11+
paths:
12+
- 'impl/rust-cli/**'
13+
- 'proofs/lean4/**'
14+
15+
permissions: read-all
16+
17+
jobs:
18+
test:
19+
name: Test Rust CLI
20+
runs-on: ubuntu-latest
21+
steps:
22+
- name: Checkout code
23+
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4
24+
25+
- name: Install Rust toolchain
26+
uses: dtolnay/rust-toolchain@6d9817901c499d6b02debbb57edb38d33daa680b # stable
27+
with:
28+
components: rustfmt, clippy
29+
30+
- name: Cache Rust dependencies
31+
uses: Swatinem/rust-cache@ad397744b0d591a723ab90405b7247fac0e6b8db # v2
32+
with:
33+
workspaces: impl/rust-cli
34+
35+
- name: Check formatting
36+
working-directory: impl/rust-cli
37+
run: cargo fmt --check
38+
39+
- name: Run clippy
40+
working-directory: impl/rust-cli
41+
run: cargo clippy --all-targets --all-features -- -D warnings
42+
43+
- name: Run unit tests
44+
working-directory: impl/rust-cli
45+
run: cargo test --lib --verbose
46+
47+
- name: Run integration tests
48+
working-directory: impl/rust-cli
49+
run: cargo test --test integration_test --verbose
50+
51+
- name: Run property tests
52+
working-directory: impl/rust-cli
53+
run: cargo test --test property_tests --verbose
54+
55+
- name: Build release binary
56+
working-directory: impl/rust-cli
57+
run: cargo build --release
58+
59+
- name: Verify binary works
60+
working-directory: impl/rust-cli
61+
run: |
62+
./target/release/vsh --version
63+
echo "mkdir test_ci" | ./target/release/vsh
64+
65+
lean4:
66+
name: Verify Lean 4 Proofs
67+
runs-on: ubuntu-latest
68+
steps:
69+
- name: Checkout code
70+
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4
71+
72+
- name: Install Lean 4
73+
run: |
74+
curl -sSf https://raw.githubusercontent.com/leanprover/elan/master/elan-init.sh | sh -s -- -y --default-toolchain leanprover/lean4:v4.12.0
75+
echo "$HOME/.elan/bin" >> $GITHUB_PATH
76+
77+
- name: Verify elan installation
78+
run: |
79+
lean --version
80+
lake --version
81+
82+
- name: Build Lean proofs
83+
working-directory: proofs/lean4
84+
run: lake build
85+
86+
- name: Check for proof completeness
87+
working-directory: proofs/lean4
88+
run: |
89+
# Count sorry placeholders (should be minimal)
90+
SORRY_COUNT=$(grep -r "sorry" *.lean | wc -l || echo "0")
91+
echo "Found $SORRY_COUNT sorry placeholders in proofs"
92+
# Note: Some sorry placeholders are expected during development

0 commit comments

Comments
 (0)