Skip to content

UnityChain

UnityChain #14

Workflow file for this run

name: STELLARHUNTS
on:
workflow_dispatch:
push:
branches:
- main
pull_request:
permissions: read-all
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Install Rust toolchain
uses: dtolnay/rust-toolchain@stable
with:
targets: wasm32-unknown-unknown
components: rustfmt
# The "Install Soroban / Stellar CLI" step was removed: stellar-cli
# v22.0.0 is not published (the release URL returns 404) and no step
# in this workflow invokes the CLI. Re-add with a verified release
# tag if/when a deployment step is introduced.
# `cargo --locked` reads the committed `onchain/Cargo.lock` verbatim
# (most importantly pinning `ed25519-dalek 2.1.1` to work around the
# `soroban-env-host 22.1.3` ↔ `ed25519-dalek 3.0` trait-bound
# incompatibility) and fails if the resolved graph would diverge.
# Build for wasm32 — Soroban contracts are deployed as WASM cdylibs.
- name: Build contracts
working-directory: onchain
run: cargo build --workspace --target wasm32-unknown-unknown --release --locked
- name: Format check
working-directory: onchain
run: cargo fmt --all -- --check
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Install Rust toolchain
uses: dtolnay/rust-toolchain@stable
with:
toolchain: stable
# The "Install Soroban / Stellar CLI" step was removed: stellar-cli
# v22.0.0 is not published (the release URL returns 404) and no step
# in this workflow invokes the CLI. Re-add with a verified release
# tag if/when a deployment step is introduced.
# Build tests on host with the `testutils` feature (see each
# contract's `[dev-dependencies] soroban-sdk = { features = ["testutils"] }`)
# so `mock_all_auths`, `register_contract`, `Address::generate`, etc.
# are available. `--locked` honours the committed Cargo.lock.
- name: Build contracts (test profile)
working-directory: onchain
run: cargo build --workspace --tests --locked
- name: Run unit tests
working-directory: onchain
run: cargo test --workspace --locked