Skip to content

ci(contracts): add contracts-only Soroban build/test workflow#226

Merged
Calebux merged 1 commit intoCalebux:mainfrom
samieazubike:main
Mar 29, 2026
Merged

ci(contracts): add contracts-only Soroban build/test workflow#226
Calebux merged 1 commit intoCalebux:mainfrom
samieazubike:main

Conversation

@samieazubike
Copy link
Copy Markdown
Contributor

Closes #112

Summary

This PR adds a dedicated GitHub Actions workflow for Soroban contracts and scopes it to contract changes only.

What changed

  • Added .github/workflows/contracts.yml with:
    • trigger on push and pull_request to main with paths: ['contracts/**']
    • Rust setup via dtolnay/rust-toolchain@stable targeting wasm32-unknown-unknown
    • dependency caching via Swatinem/rust-cache@v2
    • contract build step:
      • cargo build --target wasm32-unknown-unknown --release
    • contract test step:
      • cargo test
    • wasm artifact size logging step for target/wasm32-unknown-unknown/release/*.wasm

Security / best-practice improvements

  • minimal workflow permissions: contents: read
  • concurrency control to cancel superseded runs
  • job timeout (timeout-minutes: 20)
  • hardened bash in size-check step (set -euo pipefail, nullglob handling)

Cleanup

  • Removed old .github/workflows/soroban_tests.yml to avoid overlapping/duplicate contract CI execution and ensure contracts CI is scoped to contracts/**.

Acceptance Criteria Mapping

  • Contract workflow only triggers on changes to contracts/**
  • Contracts build is verified for wasm32-unknown-unknown
  • cargo test is executed in CI
  • WASM output sizes are logged

Validation notes

  • Workflow file structure and triggers verified locally by inspection.
  • Local contract compilation currently reports pre-existing Rust contract errors (duplicate type definitions in subscription_renewal), which are outside the CI workflow implementation scope.

@drips-wave
Copy link
Copy Markdown

drips-wave bot commented Mar 25, 2026

@samieazubike Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits.

You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀

Learn more about application limits

@Calebux Calebux merged commit 6554a38 into Calebux:main Mar 29, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add GitHub Actions CI: Soroban smart contract build verification

2 participants