Skip to content

Refactor: replace hardcoded literals with shared constants and add guardrails #104

Refactor: replace hardcoded literals with shared constants and add guardrails

Refactor: replace hardcoded literals with shared constants and add guardrails #104

Workflow file for this run

name: Rust CI
on:
push:
branches:
- main
- develop
pull_request:
types:
- opened
- synchronize
- reopened
jobs:
ci:
name: Rust CI
runs-on: ubuntu-latest
defaults:
run:
working-directory: ./contracts
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Set up Rust toolchain
uses: dtolnay/rust-toolchain@stable
with:
components: rustfmt, clippy
targets: wasm32-unknown-unknown, wasm32v1-none
- name: Cache cargo build artifacts
uses: Swatinem/rust-cache@v2
with:
cache-on-failure: true
workspaces: "./contracts"
- name: Install Stellar CLI
uses: stellar/stellar-cli@v23.0.1
- name: Check formatting
run: cargo fmt --all -- --check
- name: Run Clippy
run: cargo clippy --all-targets --all-features -- -D warnings
- name: Run tests
run: cargo test
- name: Build all Wasm artifacts
run: stellar contract build