feat(contract): add on-chain proposal voting system #7
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
| # Issue #48 — Contracts CI for the Soroban Rust workspace. | |
| # | |
| # Triggers on push or PR that touches `contracts/**` (or this workflow file). | |
| # Installs the pinned Rust toolchain and the `wasm32-unknown-unknown` target, | |
| # runs `cargo test -p token_transfer`, then builds the release WASM. Cargo's | |
| # registry and `target/` directory are cached on the workflow key so | |
| # subsequent runs skip the dependency rebuild. | |
| name: Contracts CI | |
| on: | |
| push: | |
| paths: | |
| - 'contracts/**' | |
| - '.github/workflows/contracts-ci.yml' | |
| pull_request: | |
| paths: | |
| - 'contracts/**' | |
| - '.github/workflows/contracts-ci.yml' | |
| jobs: | |
| test-and-build: | |
| name: cargo test + build (wasm32) | |
| runs-on: ubuntu-latest | |
| defaults: | |
| run: | |
| working-directory: contracts | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| - name: Install Rust toolchain (stable + wasm32 target) | |
| uses: dtolnay/rust-toolchain@stable | |
| with: | |
| targets: wasm32-unknown-unknown | |
| - name: Cache cargo registry and build artifacts | |
| uses: actions/cache@v4 | |
| with: | |
| path: | | |
| ~/.cargo/registry/index | |
| ~/.cargo/registry/cache | |
| ~/.cargo/git/db | |
| contracts/target | |
| key: ${{ runner.os }}-cargo-contracts-${{ hashFiles('contracts/Cargo.lock') }} | |
| restore-keys: | | |
| ${{ runner.os }}-cargo-contracts- | |
| - name: cargo test -p token_transfer | |
| run: cargo test -p token_transfer | |
| - name: cargo build (release wasm32) | |
| run: cargo build -p token_transfer --target wasm32-unknown-unknown --release |