fix: add missing enqueueDonationMatching import in donations route an… #8
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: Contracts CI | ||
| on: | ||
| push: | ||
| branches: [main, develop] | ||
| paths: [contracts/**] | ||
| pull_request: | ||
| paths: [contracts/**] | ||
| workflow_dispatch: | ||
| jobs: | ||
| test: | ||
| name: Soroban Contracts (Rust) | ||
| runs-on: ubuntu-latest | ||
| defaults: | ||
| run: | ||
| working-directory: contracts | ||
| steps: | ||
| - uses: actions/checkout@v4 | ||
| - name: Install Rust toolchain | ||
| uses: dtolnay/rust-toolchain@stable | ||
| with: | ||
| toolchain: 1.91.0 | ||
| targets: wasm32v1-none | ||
| components: rustfmt, clippy | ||
| - name: Cache Rust dependencies | ||
| uses: Swatinem/rust-cache@v2 | ||
| with: | ||
| workspaces: contracts | ||
| - name: Check formatting | ||
| run: cargo fmt --all -- --check | ||
| - name: Run Clippy | ||
| run: cargo clippy --workspace -- -D warnings | ||
| - name: Run tests (skip duplicate fuzz run -- handled by dedicated fuzz job) | ||
| run: "cargo test --features testutils --workspace -- --skip fuzz::" | ||
| - name: Build WASM | ||
| run: cargo build --workspace --target wasm32v1-none --release | ||
| fuzz: | ||
| name: Fuzz Tests (256 cases each) | ||
| runs-on: ubuntu-latest | ||
| timeout-minutes: 20 | ||
| defaults: | ||
| run: | ||
| working-directory: contracts | ||
| steps: | ||
| - uses: actions/checkout@v4 | ||
| - name: Install Rust toolchain | ||
| uses: dtolnay/rust-toolchain@stable | ||
| with: | ||
| toolchain: 1.91.0 | ||
| targets: wasm32v1-none | ||
| components: rustfmt, clippy | ||
| - name: Cache Rust dependencies | ||
| uses: Swatinem/rust-cache@v2 | ||
| with: | ||
| workspaces: contracts | ||
| - name: Run fuzz tests | ||
| run: cargo test --features testutils -- fuzz | ||
| env: | ||
| FUZZ_ITERATIONS: 256 | ||
| deep-fuzz: | ||
| name: Deep Fuzz (2k cases each -- nightly) | ||
| if: github.event_name == 'schedule' || github.event_name == 'workflow_dispatch' | ||
| runs-on: ubuntu-latest | ||
| timeout-minutes: 120 | ||
| defaults: | ||
| run: | ||
| working-directory: contracts | ||
| steps: | ||
| - uses: actions/checkout@v4 | ||
| - name: Install Rust toolchain | ||
| uses: dtolnay/rust-toolchain@stable | ||
| with: | ||
| toolchain: 1.91.0 | ||
| targets: wasm32v1-none | ||
| components: rustfmt, clippy | ||
| - name: Cache Rust dependencies | ||
| uses: Swatinem/rust-cache@v2 | ||
| with: | ||
| workspaces: contracts | ||
| deep-fuzz: | ||
| name: Deep Fuzz (2k cases each -- nightly) | ||
| if: github.event_name == 'schedule' || github.event_name == 'workflow_dispatch' | ||
| runs-on: ubuntu-latest | ||
| timeout-minutes: 120 | ||
| defaults: | ||
| run: | ||
| working-directory: contracts | ||
| steps: | ||
| - uses: actions/checkout@v4 | ||
| - name: Install Rust toolchain | ||
| uses: dtolnay/rust-toolchain@stable | ||
| with: | ||
| toolchain: 1.91.0 | ||
| targets: wasm32v1-none | ||
| components: rustfmt, clippy | ||
| - name: Cache Rust dependencies | ||
| uses: Swatinem/rust-cache@v2 | ||
| with: | ||
| workspaces: contracts | ||
| - name: Run deep fuzz tests | ||
| run: cargo test --features testutils -- fuzz | ||
| env: | ||
| FUZZ_ITERATIONS: 2000 | ||
| deep-fuzz-pr: | ||
| name: Deep Fuzz (500 cases each -- PR) | ||
| if: github.event_name == 'pull_request' | ||
| runs-on: ubuntu-latest | ||
| timeout-minutes: 30 | ||
| defaults: | ||
| run: | ||
| working-directory: contracts | ||
| steps: | ||
| - uses: actions/checkout@v4 | ||
| - name: Install Rust toolchain | ||
| uses: dtolnay/rust-toolchain@stable | ||
| with: | ||
| toolchain: 1.91.0 | ||
| targets: wasm32v1-none | ||
| components: rustfmt, clippy | ||
| - name: Cache Rust dependencies | ||
| uses: Swatinem/rust-cache@v2 | ||
| with: | ||
| workspaces: contracts | ||
| - name: Run deep fuzz tests | ||
| run: cargo test --features testutils -- fuzz | ||
| env: | ||
| FUZZ_ITERATIONS: 500 | ||
| coverage: | ||
| name: Coverage (tarpaulin) | ||
| if: github.event_name == 'pull_request' | ||
| runs-on: ubuntu-latest | ||
| defaults: | ||
| run: | ||
| working-directory: contracts | ||
| steps: | ||
| - uses: actions/checkout@v4 | ||
| - name: Install Rust toolchain | ||
| uses: dtolnay/rust-toolchain@stable | ||
| with: | ||
| toolchain: 1.91.0 | ||
| components: llvm-tools-preview | ||
| - name: Install cargo-tarpaulin | ||
| run: cargo install cargo-tarpaulin | ||
| - name: Cache Rust dependencies | ||
| uses: Swatinem/rust-cache@v2 | ||
| with: | ||
| workspaces: contracts | ||
| - name: Run coverage | ||
| run: cargo tarpaulin --config indigopay-contract/.tarpaulin.toml --features testutils --out Html --out Lcov -- --skip fuzz | ||
| - name: Upload coverage report | ||
| uses: actions/upload-artifact@v4 | ||
| with: | ||
| name: coverage-report | ||
| path: contracts/indigopay-contract/coverage/ | ||