Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
49 changes: 49 additions & 0 deletions .github/workflows/cli-tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
name: CLI Tests

on:
pull_request:
branches: [main]
paths:
- "cli/**"

permissions:
contents: read

jobs:
test:
name: cargo test (cli)
runs-on: ubuntu-latest

defaults:
run:
working-directory: cli

steps:
- uses: actions/checkout@v4

- uses: dtolnay/rust-toolchain@stable
with:
toolchain: stable
components: clippy, rustfmt

- uses: actions/cache@v4
with:
path: |
~/.cargo/registry
~/.cargo/git
cli/target
key: ${{ runner.os }}-cargo-cli-${{ hashFiles('cli/Cargo.lock') }}
restore-keys: |
${{ runner.os }}-cargo-cli-

- name: Check formatting
run: cargo fmt --check

- name: Clippy
run: cargo clippy -- -D warnings

- name: Build
run: cargo build

- name: Run tests
run: cargo test
32 changes: 32 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,10 +1,12 @@
# ── Secrets / environment ──────────────────────────────────────────────────
# Environment files
.env
.env.local
.env.mainnet
.env.testnet
.env.*.local

# ── Deployment artefacts ───────────────────────────────────────────────────
# Build output
dist/
build/
Expand All @@ -16,7 +18,37 @@ target/

# Generated artifacts
artifacts/addresses.json

# ── Coverage / test snapshots ─────────────────────────────────────────────
coverage/
*.snap
**/__snapshots__/
playwright-report/
test-results/

# ── Rust build artefacts ───────────────────────────────────────────────────
target/
**/target/
**/*.lock.bak

# ── Node / JS build artefacts ─────────────────────────────────────────────
node_modules/
dist/
.vite/
*.tsbuildinfo

# ── OS / editor noise ─────────────────────────────────────────────────────
.DS_Store
Thumbs.db
.idea/
.vscode/
*.swp
*.swo

# ── Temporary / generated files ───────────────────────────────────────────
*.tmp
*.bak
*.log

# Test snapshots & reports
**/test_snapshots/
Expand Down
20 changes: 20 additions & 0 deletions cli/Cargo.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
[package]
name = "cbh"
version = "0.1.0"
edition = "2021"
description = "COMEBACKHERE protocol CLI – pre-flight checks and config scaffolding"

[[bin]]
name = "cbh"
path = "src/main.rs"

[dependencies]
clap = { version = "4.5", features = ["derive"] }
serde = { version = "1", features = ["derive"] }
serde_json = "1"
reqwest = { version = "0.12", features = ["json", "blocking"] }
anyhow = "1"
toml = "0.8"

[dev-dependencies]
tempfile = "3"
Loading
Loading