Merge pull request #117 from NUMBER72857/feature/lending-platform-iss… #126
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: Unit Tests | |
| on: | |
| push: | |
| branches: [ main, develop, master ] | |
| paths: | |
| - 'contracts/lib/**' | |
| - 'contracts/traits/**' | |
| - 'contracts/governance/**' | |
| - 'contracts/staking/**' | |
| - 'Cargo.toml' | |
| - 'Cargo.lock' | |
| pull_request: | |
| branches: [ main, develop, master ] | |
| paths: | |
| - 'contracts/lib/**' | |
| - 'contracts/traits/**' | |
| - 'contracts/governance/**' | |
| - 'contracts/staking/**' | |
| - 'Cargo.toml' | |
| - 'Cargo.lock' | |
| workflow_dispatch: | |
| env: | |
| CARGO_TERM_COLOR: always | |
| jobs: | |
| test: | |
| name: PropertyRegistry Unit Tests | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: dtolnay/rust-toolchain@stable | |
| - uses: actions/cache@v4 | |
| with: | |
| path: | | |
| ~/.cargo/bin/ | |
| ~/.cargo/registry/index/ | |
| ~/.cargo/registry/cache/ | |
| ~/.cargo/git/db/ | |
| target/ | |
| key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }} | |
| restore-keys: | | |
| ${{ runner.os }}-cargo- | |
| - name: Run PropertyRegistry unit tests | |
| working-directory: contracts/lib | |
| run: cargo test --lib | |
| governance-tests: | |
| name: Governance Unit Tests | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: dtolnay/rust-toolchain@stable | |
| - uses: actions/cache@v4 | |
| with: | |
| path: | | |
| ~/.cargo/bin/ | |
| ~/.cargo/registry/index/ | |
| ~/.cargo/registry/cache/ | |
| ~/.cargo/git/db/ | |
| target/ | |
| key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }} | |
| restore-keys: | | |
| ${{ runner.os }}-cargo- | |
| - name: Run Governance unit tests | |
| working-directory: contracts/governance | |
| run: cargo test --lib | |
| staking-tests: | |
| name: Staking Unit Tests | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: dtolnay/rust-toolchain@stable | |
| - uses: actions/cache@v4 | |
| with: | |
| path: | | |
| ~/.cargo/bin/ | |
| ~/.cargo/registry/index/ | |
| ~/.cargo/registry/cache/ | |
| ~/.cargo/git/db/ | |
| target/ | |
| key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }} | |
| restore-keys: | | |
| ${{ runner.os }}-cargo- | |
| - name: Run Staking unit tests | |
| working-directory: contracts/staking | |
| run: cargo test --lib |