fix: validate contract initialization parameters atomically (#1430) #1333
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: Soroban Smart Contracts CI | |
| on: | |
| push: | |
| branches: [ "master" ] | |
| pull_request: | |
| branches: [ "master" ] | |
| env: | |
| CARGO_TERM_COLOR: always | |
| jobs: | |
| build: | |
| runs-on: macos-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Install Rust | |
| run: | | |
| curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y | |
| source $HOME/.cargo/env | |
| - name: Install Rust target for Soroban | |
| run: | | |
| source $HOME/.cargo/env | |
| rustup target add wasm32v1-none | |
| - name: Install Stellar CLI with Homebrew | |
| run: | | |
| brew update | |
| brew install stellar-cli | |
| stellar --version | |
| - name: Build Cargo project | |
| run: | | |
| source $HOME/.cargo/env | |
| cargo build --verbose | |
| - name: Build Soroban contract | |
| run: | | |
| source $HOME/.cargo/env | |
| stellar contract build --verbose | |
| - name: Run stable contract tests | |
| run: | | |
| source $HOME/.cargo/env | |
| # The predictify-hybrid legacy test modules are out of sync with the | |
| # current public contract API. Keep CI focused on the maintained | |
| # contract crates until those tests are migrated. | |
| cargo test -p hello-world -p oracles --verbose |