Skip to content

chore(deps): bump the non-critical group across 1 directory with 20 updates #224

chore(deps): bump the non-critical group across 1 directory with 20 updates

chore(deps): bump the non-critical group across 1 directory with 20 updates #224

name: Property-Based Tests
on:
push:
branches: [main, "feat/**", "test/**"]
paths:
- "src/**"
- "Cargo.toml"
- "Cargo.lock"
- "backend/src/__tests__/fee-calculation-property.test.ts"
- "backend/package.json"
- ".github/workflows/property-tests.yml"
pull_request:
branches: [main]
paths:
- "src/**"
- "Cargo.toml"
- "Cargo.lock"
- "backend/src/__tests__/fee-calculation-property.test.ts"
- "backend/package.json"
- ".github/workflows/property-tests.yml"
env:
CARGO_TERM_COLOR: always
# Run 100,000 cases per property to satisfy the acceptance criterion:
# "100,000 random fee inputs do not violate any fee invariants"
PROPTEST_CASES: 100000
jobs:
# ── Rust proptest fee invariants ────────────────────────────────────────────
rust-fee-property-tests:
name: Rust Fee Property Tests (100k cases)
runs-on: ubuntu-latest
timeout-minutes: 30
steps:
- uses: actions/checkout@v4
- name: Install Rust toolchain
uses: dtolnay/rust-toolchain@stable
with:
targets: wasm32-unknown-unknown
- name: Cache Cargo registry
uses: actions/cache@v4
with:
path: |
~/.cargo/registry
~/.cargo/git
target
key: ${{ runner.os }}-cargo-proptest-${{ hashFiles('Cargo.lock') }}
restore-keys: ${{ runner.os }}-cargo-
- name: Run fee property tests — 100k cases
run: cargo test --features legacy-tests test_fee_property -- --nocapture
- name: Run all prop_ prefixed property tests
run: cargo test --features legacy-tests prop_ -- --nocapture
- name: Run state machine property tests
run: cargo test test_state_machine_property -- --nocapture
# ── TypeScript fast-check fee invariants ────────────────────────────────────
typescript-fee-property-tests:
name: TypeScript Fee Property Tests (fast-check, 100k runs)
runs-on: ubuntu-latest
timeout-minutes: 15
defaults:
run:
working-directory: backend
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: "20"
cache: npm
- run: npm ci
working-directory: .
- name: Run fast-check fee property tests
run: npx vitest run src/__tests__/fee-calculation-property.test.ts --reporter=verbose
env:
# fast-check numRuns is configured inline in the test file; this env
# var is exposed so tests can override the count if needed.
FC_NUM_RUNS: "100000"