Transaction Science open standards monorepo. Each subdirectory is a self-contained reference protocol with its own README and licence. - openpay/ Apache-2.0 payment-acceptance stack (Rust, 26 crates) - smart-byte/ CC-BY-4.0 content-addressed value carrier (spec) - eoc/ CC-BY-4.0 energy-optimised compute (spec) The wire format and the right to fork are public. The optional hosted services are the offer; the protocols are not.
114 lines
4.3 KiB
YAML
114 lines
4.3 KiB
YAML
name: CI
|
|
|
|
on:
|
|
push:
|
|
branches: [main]
|
|
pull_request:
|
|
branches: [main]
|
|
|
|
env:
|
|
CARGO_TERM_COLOR: always
|
|
RUST_BACKTRACE: 1
|
|
|
|
jobs:
|
|
# ───────────────────────────────────────────────────────────────
|
|
# Format + lint. Fast feedback gate before the expensive jobs.
|
|
# ───────────────────────────────────────────────────────────────
|
|
lint:
|
|
name: fmt + clippy
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
|
|
- name: Install Rust toolchain
|
|
uses: dtolnay/rust-toolchain@stable
|
|
with:
|
|
toolchain: "1.95"
|
|
components: rustfmt, clippy
|
|
|
|
- name: Cache cargo
|
|
uses: Swatinem/rust-cache@v2
|
|
|
|
- name: cargo fmt --check
|
|
run: cargo fmt --all -- --check
|
|
|
|
- name: cargo clippy (default features)
|
|
run: cargo clippy --workspace --all-targets -- -D warnings
|
|
|
|
- name: cargo clippy (op-rails-crypto evm)
|
|
run: cargo clippy -p op-rails-crypto --features evm --all-targets -- -D warnings
|
|
|
|
- name: cargo clippy (op-webhook reqwest-transport)
|
|
run: cargo clippy -p op-webhook --features reqwest-transport --all-targets -- -D warnings
|
|
|
|
# ───────────────────────────────────────────────────────────────
|
|
# Build + unit tests across the workspace, default features.
|
|
# ───────────────────────────────────────────────────────────────
|
|
test:
|
|
name: cargo test --workspace
|
|
runs-on: ubuntu-latest
|
|
needs: lint
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
|
|
- name: Install Rust toolchain
|
|
uses: dtolnay/rust-toolchain@stable
|
|
with:
|
|
toolchain: "1.95"
|
|
|
|
- name: Cache cargo
|
|
uses: Swatinem/rust-cache@v2
|
|
|
|
- name: cargo build (workspace, all targets)
|
|
run: cargo build --workspace --all-targets
|
|
|
|
- name: cargo test (workspace)
|
|
run: cargo test --workspace --no-fail-fast
|
|
|
|
# ───────────────────────────────────────────────────────────────
|
|
# Feature-gated test paths that the default workspace run misses.
|
|
# Kept as separate jobs so a feature regression is obvious.
|
|
# ───────────────────────────────────────────────────────────────
|
|
test-features:
|
|
name: cargo test (feature-gated)
|
|
runs-on: ubuntu-latest
|
|
needs: lint
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
|
|
- name: Install Rust toolchain
|
|
uses: dtolnay/rust-toolchain@stable
|
|
with:
|
|
toolchain: "1.95"
|
|
|
|
- name: Cache cargo
|
|
uses: Swatinem/rust-cache@v2
|
|
|
|
- name: test op-webhook --features reqwest-transport
|
|
run: cargo test -p op-webhook --features reqwest-transport --no-fail-fast
|
|
|
|
- name: test op-rails-crypto --features evm
|
|
run: cargo test -p op-rails-crypto --features evm --no-fail-fast
|
|
|
|
# ───────────────────────────────────────────────────────────────
|
|
# Doc build. Broken intra-doc links are common; catch them here.
|
|
# ───────────────────────────────────────────────────────────────
|
|
docs:
|
|
name: cargo doc
|
|
runs-on: ubuntu-latest
|
|
needs: lint
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
|
|
- name: Install Rust toolchain
|
|
uses: dtolnay/rust-toolchain@stable
|
|
with:
|
|
toolchain: "1.95"
|
|
|
|
- name: Cache cargo
|
|
uses: Swatinem/rust-cache@v2
|
|
|
|
- name: cargo doc --no-deps
|
|
env:
|
|
RUSTDOCFLAGS: "-D warnings"
|
|
run: cargo doc --workspace --no-deps --document-private-items
|