|
6 | 6 | paths: |
7 | 7 | - 'contracts/lib/**' |
8 | 8 | - 'contracts/traits/**' |
| 9 | + - 'contracts/governance/**' |
| 10 | + - 'contracts/staking/**' |
9 | 11 | - 'Cargo.toml' |
10 | 12 | - 'Cargo.lock' |
11 | 13 | pull_request: |
12 | 14 | branches: [ main, develop, master ] |
13 | 15 | paths: |
14 | 16 | - 'contracts/lib/**' |
15 | 17 | - 'contracts/traits/**' |
| 18 | + - 'contracts/governance/**' |
| 19 | + - 'contracts/staking/**' |
16 | 20 | - 'Cargo.toml' |
17 | 21 | - 'Cargo.lock' |
18 | 22 | workflow_dispatch: |
|
44 | 48 | - name: Run PropertyRegistry unit tests |
45 | 49 | working-directory: contracts/lib |
46 | 50 | run: cargo test --lib |
| 51 | + |
| 52 | + governance-tests: |
| 53 | + name: Governance Unit Tests |
| 54 | + runs-on: ubuntu-latest |
| 55 | + steps: |
| 56 | + - uses: actions/checkout@v4 |
| 57 | + |
| 58 | + - uses: dtolnay/rust-toolchain@stable |
| 59 | + |
| 60 | + - uses: actions/cache@v4 |
| 61 | + with: |
| 62 | + path: | |
| 63 | + ~/.cargo/bin/ |
| 64 | + ~/.cargo/registry/index/ |
| 65 | + ~/.cargo/registry/cache/ |
| 66 | + ~/.cargo/git/db/ |
| 67 | + target/ |
| 68 | + key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }} |
| 69 | + restore-keys: | |
| 70 | + ${{ runner.os }}-cargo- |
| 71 | +
|
| 72 | + - name: Run Governance unit tests |
| 73 | + working-directory: contracts/governance |
| 74 | + run: cargo test --lib |
| 75 | + |
| 76 | + staking-tests: |
| 77 | + name: Staking Unit Tests |
| 78 | + runs-on: ubuntu-latest |
| 79 | + steps: |
| 80 | + - uses: actions/checkout@v4 |
| 81 | + |
| 82 | + - uses: dtolnay/rust-toolchain@stable |
| 83 | + |
| 84 | + - uses: actions/cache@v4 |
| 85 | + with: |
| 86 | + path: | |
| 87 | + ~/.cargo/bin/ |
| 88 | + ~/.cargo/registry/index/ |
| 89 | + ~/.cargo/registry/cache/ |
| 90 | + ~/.cargo/git/db/ |
| 91 | + target/ |
| 92 | + key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }} |
| 93 | + restore-keys: | |
| 94 | + ${{ runner.os }}-cargo- |
| 95 | +
|
| 96 | + - name: Run Staking unit tests |
| 97 | + working-directory: contracts/staking |
| 98 | + run: cargo test --lib |
0 commit comments