feat: surface token transfer errors in escrow and related modules #961
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Soroban Smart Contracts CI | |
| on: | |
| push: | |
| branches: ["main"] | |
| pull_request: | |
| branches: ["main"] | |
| env: | |
| CARGO_TERM_COLOR: always | |
| jobs: | |
| build: | |
| runs-on: macos-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Install Rust | |
| run: | | |
| curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y | |
| source $HOME/.cargo/env | |
| - name: Install Rust target for Soroban | |
| run: | | |
| source $HOME/.cargo/env | |
| rustup target add wasm32v1-none | |
| - name: Install Stellar CLI with Homebrew | |
| run: | | |
| brew update | |
| brew install stellar-cli | |
| stellar --version | |
| - name: Build Cargo project | |
| run: | | |
| cd quicklendx-contracts | |
| cargo build --verbose | |
| - name: Check code quality | |
| run: | | |
| source $HOME/.cargo/env | |
| cd quicklendx-contracts | |
| cargo check --lib --verbose | |
| - name: Install wasm-opt (binaryen) for size reduction | |
| run: brew install binaryen | |
| - name: Build and check WASM size budget (shell script) | |
| run: | | |
| source $HOME/.cargo/env | |
| quicklendx-contracts/scripts/check-wasm-size.sh | |
| - name: Run WASM size budget regression tests | |
| # Runs tests/wasm_build_size_budget.rs – a self-contained integration test | |
| # that does NOT import contract types, so it compiles independently of the | |
| # legacy test suite. It enforces: | |
| # • hard budget (256 KiB) | |
| # • warning zone (90 % of budget) | |
| # • regression limit (baseline + 5 % margin) | |
| # plus ~30 fast unit tests for constants, classify_size, and helpers. | |
| run: | | |
| source $HOME/.cargo/env | |
| cd quicklendx-contracts | |
| cargo test --test wasm_build_size_budget --verbose | |
| - name: Run Cargo tests | |
| if: false # temporarily disabled; legacy test suite currently not compiling | |
| run: | | |
| source $HOME/.cargo/env | |
| cd quicklendx-contracts | |
| cargo test --verbose | |
| - name: Test coverage (minimum 95%) | |
| if: false # temporarily disabled alongside test step | |
| run: | | |
| source $HOME/.cargo/env | |
| cd quicklendx-contracts | |
| cargo install cargo-llvm-cov | |
| cargo llvm-cov --lib --fail-under 95 |