Skip to content

Commit

Permalink
Use CI shell on CI
Browse files Browse the repository at this point in the history
  • Loading branch information
ThetaSinner committed Jun 18, 2024
1 parent 99644e6 commit 04ef509
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 12 deletions.
24 changes: 12 additions & 12 deletions .github/workflows/test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -51,11 +51,11 @@ jobs:

- name: Cargo sweep mark for files
run: |
nix develop -c bash -c "cargo install cargo-sweep && cargo sweep --time 5"
nix develop .#ci -c bash -c "cargo install cargo-sweep && cargo sweep --time 5"
- name: Check scripts
run: |
nix develop -c bash -c "shellcheck scripts/*.sh"
nix develop .#ci -c bash -c "shellcheck scripts/*.sh"
- name: Check Nix formatting
run: |
Expand All @@ -81,7 +81,7 @@ jobs:
- name: Smoke test - zome_call_single_value
run: |
# Start a sandbox conductor and run it in the background
nix develop -c bash -c "hc s clean && echo "1234" | hc s --piped create && echo "1234" | hc s --piped -f 8888 run &"
nix develop .#ci -c bash -c "hc s clean && echo "1234" | hc s --piped create && echo "1234" | hc s --piped -f 8888 run &"
# TODO using `localhost` is resolving to an IPv6 address, but why is that giving a connection refused?
# Run the scenario for 5 seconds
Expand All @@ -92,7 +92,7 @@ jobs:
- name: Smoke test - single_write_many_read
run: |
# Start a sandbox conductor and run it in the background
nix develop -c bash -c "hc s clean && echo "1234" | hc s --piped create && echo "1234" | hc s --piped -f 8888 run &"
nix develop .#ci -c bash -c "hc s clean && echo "1234" | hc s --piped create && echo "1234" | hc s --piped -f 8888 run &"
# Run the scenario for 5 seconds
RUST_LOG=info nix run .#single_write_many_read -- --connection-string ws://localhost:8888 --duration 5 --no-progress
Expand All @@ -102,7 +102,7 @@ jobs:
- name: Smoke test - dht_sync_lag
run: |
# Start a sandbox conductor and run it in the background
nix develop -c bash -c "hc s clean && echo "1234" | hc s --piped create && echo "1234" | hc s --piped -f 8888 run &"
nix develop .#ci -c bash -c "hc s clean && echo "1234" | hc s --piped create && echo "1234" | hc s --piped -f 8888 run &"
# Run the scenario for 5 seconds
RUST_LOG=info nix run .#dht_sync_lag -- --connection-string ws://localhost:8888 --agents 2 --behaviour write:1 --behaviour record_lag:1 --duration 5 --no-progress
Expand All @@ -112,7 +112,7 @@ jobs:
- name: Smoke test - app_install
run: |
# Start a sandbox conductor and run it in the background
nix develop -c bash -c "hc s clean && echo "1234" | hc s --piped create && echo "1234" | hc s --piped -f 8888 run &"
nix develop .#ci -c bash -c "hc s clean && echo "1234" | hc s --piped create && echo "1234" | hc s --piped -f 8888 run &"
# Run the scenario for 5 seconds
RUST_LOG=info nix run .#app_install -- --connection-string ws://localhost:8888 --agents 2 --behaviour minimal:1 --behaviour large:1 --duration 5 --no-progress
Expand All @@ -122,7 +122,7 @@ jobs:
- name: Smoke test - first_call
run: |
# Start a sandbox conductor and run it in the background
nix develop -c bash -c "hc s clean && echo "1234" | hc s --piped create && echo "1234" | hc s --piped -f 8888 run &"
nix develop .#ci -c bash -c "hc s clean && echo "1234" | hc s --piped create && echo "1234" | hc s --piped -f 8888 run &"
# Run the scenario for 5 seconds
RUST_LOG=info nix run .#first_call -- --connection-string ws://localhost:8888 --agents 1 --behaviour local:1 --duration 5 --no-progress
Expand All @@ -132,7 +132,7 @@ jobs:
- name: Smoke test - write_read
run: |
# Start a sandbox conductor and run it in the background
nix develop -c bash -c "hc s clean && echo "1234" | hc s --piped create && echo "1234" | hc s --piped -f 8888 run &"
nix develop .#ci -c bash -c "hc s clean && echo "1234" | hc s --piped create && echo "1234" | hc s --piped -f 8888 run &"
# Run the scenario for 5 seconds
RUST_LOG=info nix run .#write_read -- --connection-string ws://localhost:8888 --duration 5 --no-progress
Expand All @@ -142,7 +142,7 @@ jobs:
- name: Smoke test - write_query
run: |
# Start a sandbox conductor and run it in the background
nix develop -c bash -c "hc s clean && echo "1234" | hc s --piped create && echo "1234" | hc s --piped -f 8888 run &"
nix develop .#ci -c bash -c "hc s clean && echo "1234" | hc s --piped create && echo "1234" | hc s --piped -f 8888 run &"
# Run the scenario for 5 seconds
RUST_LOG=info nix run .#write_query -- --connection-string ws://localhost:8888 --duration 5 --no-progress
Expand All @@ -152,7 +152,7 @@ jobs:
- name: Smoke test - local_signals
run: |
# Start a sandbox conductor and run it in the background
nix develop -c bash -c "hc s clean && echo "1234" | hc s --piped create && echo "1234" | hc s --piped -f 8888 run &"
nix develop .#ci -c bash -c "hc s clean && echo "1234" | hc s --piped create && echo "1234" | hc s --piped -f 8888 run &"
# Run the scenario for 5 seconds
RUST_LOG=info nix run .#local_signals -- --connection-string ws://localhost:8888 --duration 5 --no-progress
Expand All @@ -162,13 +162,13 @@ jobs:
- name: Smoke test - remote_call_rate
run: |
# Start a TryCP instance
nix develop -c bash -c "source ./scripts/trycp.sh && start_trycp"
nix develop .#ci -c bash -c "source ./scripts/trycp.sh && start_trycp"
# Run the scenario for 30 seconds
RUST_LOG=info nix run .#remote_call_rate -- --targets targets-ci.yaml --instances-per-target 2 --duration 30 --no-progress
# Stop the TryCP instance
nix develop -c bash -c "source ./scripts/trycp.sh && stop_trycp"
nix develop .#ci -c bash -c "source ./scripts/trycp.sh && stop_trycp"
- name: Build scenario bundles
run: |
Expand Down
1 change: 1 addition & 0 deletions flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,7 @@
packages = [
pkgs.shellcheck
pkgs.statix
inputs.tryorama.packages.${system}.trycp-server
];
};

Expand Down

0 comments on commit 04ef509

Please sign in to comment.