SDP-1875: Implement contract account support for SEP-24 #408
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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 |