Merge pull request #109 from yosemite01/main #14
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 Tests | |
| on: | |
| push: | |
| branches: [ main, develop ] | |
| pull_request: | |
| branches: [ main ] | |
| jobs: | |
| test: | |
| name: Test Contract | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| - name: Install Rust | |
| uses: dtolnay/rust-toolchain@stable | |
| with: | |
| targets: wasm32-unknown-unknown | |
| - name: Cache cargo registry | |
| uses: actions/cache@v3 | |
| with: | |
| path: | | |
| ~/.cargo/registry | |
| ~/.cargo/git | |
| target | |
| key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }} | |
| restore-keys: | | |
| ${{ runner.os }}-cargo- | |
| - name: Install stellar-cli | |
| run: cargo install stellar-cli --locked | |
| - name: Build contract | |
| run: stellar contract build | |
| working-directory: ./wata-board-dapp/nepa_contract | |
| - name: Run tests | |
| run: cargo test --verbose | |
| working-directory: ./wata-board-dapp/nepa_contract | |
| - name: Check formatting | |
| run: cargo fmt -- --check | |
| working-directory: ./wata-board-dapp/nepa_contract | |
| - name: Run clippy | |
| run: cargo clippy -- -D warnings | |
| working-directory: ./wata-board-dapp/nepa_contract |