Skip to content

fix: missing smoke test for contract deployment — CI doesn't verify contracts deploy successfully #808

Description

@sanmipaul

Bug

`.github/workflows/ci.yml` builds and tests the Soroban contracts but does not perform an actual deployment smoke test to Stellar testnet. It's possible for contracts to pass all local unit tests but fail to deploy due to:

  • WASM binary exceeding size limits
  • Missing or incorrect contract metadata
  • Incompatible Soroban SDK version with the current testnet
  • Missing `#![no_std]` attribute causing deployment rejection

Fix

Add a deployment smoke test job that runs on PRs targeting `main`:

```yaml
deploy-smoke-test:
runs-on: ubuntu-latest
needs: [build, test]
steps:
- name: Deploy invoice contract to testnet
run: |
soroban contract deploy
--wasm target/wasm32-unknown-unknown/release/invoice.wasm
--source ${{ secrets.TESTNET_DEPLOYER_SECRET }}
--network testnet
--fee 1000000
id: deploy-invoice

- name: Smoke test — call get_invoice on deployed contract
  run: |
    soroban contract invoke \
      --id ${{ steps.deploy-invoice.outputs.contract-id }} \
      --fn get_invoice \
      --arg 999 \  # non-existent invoice
      --network testnet
    # Should return InvoiceError::NotFound — verify it doesn't crash

```

Acceptance Criteria

  • Deployment smoke test job added to CI (runs on PR to main)
  • All 3 contracts deployed and verified against testnet
  • At least one view function called per contract post-deployment
  • Deployed contract IDs output as job artifacts for debugging
  • Job uses a dedicated `TESTNET_DEPLOYER_SECRET` GitHub secret (not main admin key)

References

  • `.github/workflows/ci.yml`
  • `contracts/`

Metadata

Metadata

Assignees

Labels

Stellar WaveIssues in the Stellar wave programbugSomething isn't workingdevopsCI/CD and infrastructuretestingTest coverage and quality

Type

No type

Fields

No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions