Merge pull request #250 from 3m1n3nc3/feat/no-metrics-collection #111
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: ./contract | |
| - name: Run tests | |
| run: cargo test --verbose | |
| working-directory: ./contract | |
| - name: Check formatting | |
| run: cargo fmt -- --check | |
| working-directory: ./contract | |
| - name: Run clippy | |
| run: cargo clippy -- -D warnings | |
| working-directory: ./contract |