feat: cross-stack error taxonomy (#249) + aid_escrow MAX_ALLOWED_TOKE… #57
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: Contract CI | |
| on: | |
| push: | |
| branches: [ main, develop ] | |
| paths: | |
| - 'app/onchain/**' | |
| pull_request: | |
| branches: [ main, develop ] | |
| paths: | |
| - 'app/onchain/**' | |
| jobs: | |
| test: | |
| name: Test Suite | |
| runs-on: ubuntu-latest | |
| defaults: | |
| run: | |
| working-directory: app/onchain | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| - name: Install Rust | |
| uses: dtolnay/rust-toolchain@stable | |
| with: | |
| toolchain: stable | |
| targets: wasm32-unknown-unknown | |
| - name: Cache dependencies | |
| uses: Swatinem/rust-cache@v2 | |
| with: | |
| workspaces: "app/onchain" | |
| - name: Enforce locked dependencies | |
| run: cargo check --locked | |
| - name: Ensure Cargo.lock is updated when Cargo.toml changes | |
| if: github.event_name == 'pull_request' | |
| run: | | |
| git fetch origin "${{ github.base_ref }}" --depth=100 | |
| changed_files="$(git diff --name-only "origin/${{ github.base_ref }}" HEAD -- app/onchain/Cargo.toml app/onchain/Cargo.lock)" | |
| if echo "$changed_files" | grep -q '^app/onchain/Cargo.toml$' && ! echo "$changed_files" | grep -q '^app/onchain/Cargo.lock$'; then | |
| echo "Cargo.toml changed without updating Cargo.lock." | |
| exit 1 | |
| fi | |
| - name: Check formatting | |
| run: cargo fmt --all -- --check | |
| - name: Run clippy | |
| run: | | |
| cargo clippy --target wasm32-unknown-unknown -- -D warnings | |
| cargo clippy --tests --target x86_64-unknown-linux-gnu -- -D warnings | |
| - name: Run tests | |
| run: cargo test --target x86_64-unknown-linux-gnu |