Merge pull request #277 from DavisVT/feat/prevent-over-withdrawal-pla… #320
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 CI/CD Pipeline | |
| on: | |
| push: | |
| branches: [main, develop] | |
| paths: | |
| - 'contract/**' | |
| pull_request: | |
| branches: [ main, develop ] | |
| paths: | |
| - 'contract/**' | |
| jobs: | |
| build: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v3 | |
| - name: Setup Rust | |
| uses: actions-rs/toolchain@v1 | |
| with: | |
| toolchain: stable | |
| profile: minimal | |
| override: true | |
| - name: Install Stellar CLI | |
| run: | | |
| curl -s https://get.stellar.org | bash | |
| - name: Check formatting | |
| run: cargo fmt --all -- --check | |
| working-directory: ./contract/contract | |
| - name: Install wasm32-unknown-unknown target | |
| run: rustup target add wasm32-unknown-unknown | |
| - name: Build contract WASM (required for upgrade integration test) | |
| run: cargo build --target wasm32-unknown-unknown --release | |
| working-directory: ./contract/contract | |
| - name: Run contract tests | |
| run: cargo test | |
| working-directory: ./contract/contract | |
| - name: Build contracts | |
| run: cargo build --release | |
| working-directory: ./contract/contract | |
| - name: Deploy to Stellar testnet | |
| run: echo "Add Stellar deployment script here" | |
| working-directory: ./contract/contract | |
| env: | |
| STELLAR_SECRET: ${{ secrets.STELLAR_SECRET }} |