Feature/zero address validation 747 #1134
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: bc-forge CI | |
| on: | |
| push: | |
| branches: [main] | |
| pull_request: | |
| branches: [main] | |
| env: | |
| CARGO_TERM_COLOR: always | |
| jobs: | |
| # ─── Smart Contract CI ─────────────────────────────────────────────────── | |
| contracts: | |
| name: Smart Contracts (Rust) | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| - name: Install Rust toolchain | |
| uses: dtolnay/rust-toolchain@stable | |
| with: | |
| toolchain: 1.96.0 | |
| targets: wasm32-unknown-unknown | |
| components: rustfmt, clippy | |
| - name: Setup Rust Cache | |
| uses: Swatinem/rust-cache@v2 | |
| with: | |
| shared-key: bc-forge-contracts | |
| - name: Check formatting | |
| run: cargo fmt --all -- --check | |
| - name: Clippy lints | |
| run: cargo clippy --all-targets --all-features -- -D warnings | |
| - name: Run tests | |
| run: cargo test --all | |
| - name: Run multi-sig tests | |
| if: github.event_name == 'pull_request' | |
| run: cargo test -p bc-forge-admin | |
| - name: Install Tarpaulin | |
| run: cargo install cargo-tarpaulin --locked | |
| - name: Run coverage (Tarpaulin) | |
| run: cargo tarpaulin --workspace --out Html --out Xml --out Stdout | |
| continue-on-error: true | |
| - name: Upload coverage artifact | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: coverage-report | |
| path: ./tarpaulin-report.html | |
| - name: Build WASM | |
| env: | |
| CARGO_INCREMENTAL: 0 | |
| run: cargo build --workspace --exclude bc-forge-e2e-tests --target wasm32-unknown-unknown --release | |
| # ─── TypeScript SDK CI ────────────────────────────────────────────────── | |
| sdk: | |
| name: TypeScript SDK | |
| runs-on: ubuntu-latest | |
| defaults: | |
| run: | |
| working-directory: sdk | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| - name: Setup Node.js | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: '20' | |
| cache: 'npm' | |
| cache-dependency-path: sdk/package-lock.json | |
| - name: Install dependencies | |
| run: npm ci | |
| - name: Build | |
| run: npm run build | |
| - name: Run tests | |
| run: npm test | |
| # ─── TypeScript CLI CI ────────────────────────────────────────────────── | |
| cli: | |
| name: TypeScript CLI | |
| runs-on: ubuntu-latest | |
| defaults: | |
| run: | |
| working-directory: cli | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| - name: Setup Node.js | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: '20' | |
| cache: 'npm' | |
| cache-dependency-path: package-lock.json | |
| - name: Install dependencies | |
| run: npm ci | |
| working-directory: . | |
| - name: Build | |
| run: npm run build | |
| - name: Run tests | |
| run: npm test |