Skip to content

fix: add missing enqueueDonationMatching import in donations route an… #8

fix: add missing enqueueDonationMatching import in donations route an…

fix: add missing enqueueDonationMatching import in donations route an… #8

Workflow file for this run

name: Contracts CI

Check failure on line 1 in .github/workflows/contracts.yml

View workflow run for this annotation

GitHub Actions / .github/workflows/contracts.yml

Invalid workflow file

(Line: 95, Col: 3): 'deep-fuzz' is already defined
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/