Skip to content
Open
35 changes: 35 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
name: CI

on:
push:
branches: [main]
pull_request:

jobs:
test:
name: Build & Test (stable)
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- name: Install Rust toolchain
uses: dtolnay/rust-toolchain@stable

- name: Cache cargo registry & build artifacts
uses: actions/cache@v4
with:
path: |
~/.cargo/registry
~/.cargo/git
target
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
restore-keys: ${{ runner.os }}-cargo-

- name: Build (debug)
run: cargo build --workspace

- name: Build (release)
run: cargo build --release --workspace

- name: Run full test suite
run: cargo test --workspace -- --nocapture
4 changes: 4 additions & 0 deletions leaderboard/src/decay_tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,10 @@ fn setup() -> (
let env = Env::default();
env.mock_all_auths();
env.cost_estimate().budget().reset_unlimited();
// Behavior-focused suite: the bounded bubble plus read-time re-sort touch
// tens of slots per call, so lift the invocation resource limits just like
// the CPU budget above (mirrors tests::setup).
env.cost_estimate().disable_resource_limits();

let contract_id = env.register(LeaderboardContract, ());
let client = LeaderboardContractClient::new(&env, &contract_id);
Expand Down
Loading