Merge pull request #172 from Benalex8797/feature/platform-fee-calculator #163
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: 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 }} |