Skip to content

Commit

Permalink
feat(ci): run spend simulation test
Browse files Browse the repository at this point in the history
  • Loading branch information
RolandSherwin committed Jul 4, 2024
1 parent 5d9dfb7 commit 2b33e47
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 9 deletions.
10 changes: 8 additions & 2 deletions .github/workflows/merge.yml
Original file line number Diff line number Diff line change
Expand Up @@ -359,7 +359,7 @@ jobs:
timeout-minutes: 30

- name: Build testing executable
run: cargo test --release -p sn_node --features=local-discovery --test sequential_transfers --test storage_payments --test double_spend --no-run
run: cargo test --release -p sn_node --features=local-discovery --test sequential_transfers --test storage_payments --test double_spend --test spend_simulation --no-run
env:
# only set the target dir for windows to bypass the linker issue.
# happens if we build the node manager via testnet action
Expand All @@ -386,7 +386,7 @@ jobs:
echo "SAFE_PEERS has been set to $SAFE_PEERS"
fi
- name: execute the spend tests
- name: execute the sequential transfers tests
run: cargo test --release -p sn_node --features="local-discovery" --test sequential_transfers -- --nocapture --test-threads=1
env:
SN_LOG: "all"
Expand All @@ -406,6 +406,12 @@ jobs:
CARGO_TARGET_DIR: ${{ matrix.os == 'windows-latest' && './test-target' || '.' }}
timeout-minutes: 25

- name: execute the spend simulation
run: cargo test --release -p sn_node --features="local-discovery" --test spend_simulation -- --nocapture --test-threads=1
env:
CARGO_TARGET_DIR: ${{ matrix.os == 'windows-latest' && './test-target' || '.' }}
timeout-minutes: 25

- name: Stop the local network and upload logs
if: always()
uses: maidsafe/sn-local-testnet-action@main
Expand Down
12 changes: 9 additions & 3 deletions .github/workflows/nightly.yml
Original file line number Diff line number Diff line change
Expand Up @@ -203,7 +203,7 @@ jobs:
timeout-minutes: 30

- name: Build testing executable
run: cargo test --release -p sn_node --features=local-discovery --test sequential_transfers --test storage_payments --test double_spend --no-run
run: cargo test --release -p sn_node --features=local-discovery --test sequential_transfers --test storage_payments --test double_spend --test spend_simulation --no-run
env:
# only set the target dir for windows to bypass the linker issue.
# happens if we build the node manager via testnet action
Expand All @@ -220,7 +220,7 @@ jobs:
platform: ${{ matrix.os }}
build: true

- name: execute the spend test
- name: execute the sequential transfers test
run: cargo test --release -p sn_node --features="local-discovery" --test sequential_transfers -- --nocapture
env:
CARGO_TARGET_DIR: ${{ matrix.os == 'windows-latest' && './test-target' || '.' }}
Expand All @@ -234,12 +234,18 @@ jobs:
SN_LOG: "all"
timeout-minutes: 10

- name: execute the storage payment tests
- name: execute the double spend tests
run: cargo test --release -p sn_node --features="local-discovery" --test double_spend -- --nocapture --test-threads=1
env:
CARGO_TARGET_DIR: ${{ matrix.os == 'windows-latest' && './test-target' || '.' }}
timeout-minutes: 25

- name: execute the spend simulation test
run: cargo test --release -p sn_node --features="local-discovery" --test spend_simulation -- --nocapture --test-threads=1
env:
CARGO_TARGET_DIR: ${{ matrix.os == 'windows-latest' && './test-target' || '.' }}
timeout-minutes: 25

- name: Small wait to allow reward receipt
run: sleep 30
timeout-minutes: 1
Expand Down
13 changes: 9 additions & 4 deletions .github/workflows/nightly_wan.yml
Original file line number Diff line number Diff line change
Expand Up @@ -169,8 +169,8 @@ jobs:
continue-on-error: true

- name: Build testing executable
run: cargo test --release -p sn_node --test sequential_transfers --test storage_payments --test double_spend --no-run
timeout-minutes: 30
run: cargo test --release -p sn_node --features=local-discovery --test sequential_transfers --test storage_payments --test double_spend --test spend_simulation --no-run
timeout-minutes: 40

- name: Start a WAN network
uses: maidsafe/sn-testnet-action@main
Expand Down Expand Up @@ -199,7 +199,7 @@ jobs:
echo "Peer is $SAFE_PEERS"
echo "Deployment inventory is $SN_INVENTORY"
- name: execute the spend test
- name: execute the sequential transfers test
run: cargo test --release -p sn_node --test sequential_transfers -- --nocapture --test-threads=1
env:
SN_LOG: "all"
Expand All @@ -211,10 +211,15 @@ jobs:
SN_LOG: "all"
timeout-minutes: 45

- name: execute the storage payment tests
- name: execute the double spend tests
run: cargo test --release -p sn_node --test double_spend -- --nocapture --test-threads=1
timeout-minutes: 45


- name: execute the spend simulation tests
run: cargo test --release -p sn_node --test spend_simulation -- --nocapture --test-threads=1
timeout-minutes: 45

- name: Small wait to allow reward receipt
run: sleep 30
timeout-minutes: 1
Expand Down

0 comments on commit 2b33e47

Please sign in to comment.