Skip to content

SDP-1875: Implement contract account support for SEP-24 #408

SDP-1875: Implement contract account support for SEP-24

SDP-1875: Implement contract account support for SEP-24 #408

name: Contract Build
on:
push:
branches:
- main
pull_request:
workflow_call: # allows this workflow to be called from another workflow
jobs:
build_and_test:
name: Build and Test
runs-on: ubuntu-latest
defaults:
run:
working-directory: contracts
permissions:
contents: read
steps:
- name: Checkout the repository
uses: actions/checkout@v4
- name: Setup Rust
run: |
rustup update
rustup component add rustfmt clippy
- name: Cache Rust dependencies
uses: stellar/actions/rust-cache@main
- name: Install cargo-audit
run: |
if ! command -v cargo-audit &> /dev/null; then
cargo install cargo-audit
fi
- name: Format check
run: cargo fmt -- --check
- name: Lint with Clippy
run: cargo clippy --all-targets --all-features -- -D warnings
- name: Security audit
run: cargo audit
- name: Run tests
run: cargo test --all-features -- --nocapture