From 04ef509bc4e168895a886c44ac67eb24fc107aed Mon Sep 17 00:00:00 2001 From: ThetaSinner Date: Tue, 18 Jun 2024 15:38:27 +0100 Subject: [PATCH] Use CI shell on CI --- .github/workflows/test.yaml | 24 ++++++++++++------------ flake.nix | 1 + 2 files changed, 13 insertions(+), 12 deletions(-) diff --git a/.github/workflows/test.yaml b/.github/workflows/test.yaml index a69049a6..dd9f23be 100644 --- a/.github/workflows/test.yaml +++ b/.github/workflows/test.yaml @@ -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: | @@ -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 @@ -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 @@ -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 @@ -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 @@ -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 @@ -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 @@ -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 @@ -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 @@ -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: | diff --git a/flake.nix b/flake.nix index 87b69e80..efd07eff 100644 --- a/flake.nix +++ b/flake.nix @@ -78,6 +78,7 @@ packages = [ pkgs.shellcheck pkgs.statix + inputs.tryorama.packages.${system}.trycp-server ]; };