From 04b4f9b1d43c71c2043bb87a0be9100340b9f17d Mon Sep 17 00:00:00 2001 From: Noon van der Silk Date: Fri, 13 Sep 2024 09:49:32 +0100 Subject: [PATCH 1/3] Only test ones we know will succeed --- .github/workflows/network-test.yaml | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) diff --git a/.github/workflows/network-test.yaml b/.github/workflows/network-test.yaml index aa53e8e73a9..0cb976b98c0 100644 --- a/.github/workflows/network-test.yaml +++ b/.github/workflows/network-test.yaml @@ -29,7 +29,8 @@ jobs: # Currently this is just a label and does not have any functional impact. peers: [3] scaling_factor: [10, 50] - netem_loss: [0, 1, 2, 3, 4, 5, 10, 20] + # Note: We only put here the configuration values we _expected to pass_. + netem_loss: [0, 1, 2, 3] name: "Peers: ${{ matrix.peers }}, scaling: ${{ matrix.scaling_factor }}, loss: ${{ matrix.netem_loss }}" steps: - uses: actions/checkout@v4 @@ -103,14 +104,6 @@ jobs: limit-access-to-actor: true - name: Run pumba and the benchmarks - # Note: We're going to allow everything to fail. In the job on GitHub, - # we will be able to see which ones _did_, in fact, fail. Originally, - # we were keeping track of our expectations with 'include' and - # 'exclude' directives here, but I think it's best to leave those out, - # as some of the tests (say 5%) fail, and overall the conditions of - # failure depend on the scaling factor, the peers, etc, and it becomes - # too complicated to track here. - continue-on-error: true run: | # Extract inputs with defaults for non-workflow_dispatch events percent="${{ matrix.netem_loss }}" From 6786bbf2ef6df5234c256a18548d9e9f3c405bea Mon Sep 17 00:00:00 2001 From: Noon van der Silk Date: Fri, 13 Sep 2024 10:02:25 +0100 Subject: [PATCH 2/3] Set env var with value --- .github/workflows/network-test.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/network-test.yaml b/.github/workflows/network-test.yaml index 0cb976b98c0..156ae84e47a 100644 --- a/.github/workflows/network-test.yaml +++ b/.github/workflows/network-test.yaml @@ -74,7 +74,7 @@ jobs: --node-socket devnet/node.socket \ --cardano-signing-key devnet/credentials/faucet.sk) - echo $HYDRA_SCRIPTS_TX_ID >> .env + echo "HYDRA_SCRIPTS_TX_ID=$HYDRA_SCRIPTS_TX_ID" >> .env nix run .#cardano-cli query protocol-parameters \ --socket-path devnet/node.socket \ From 20c212f77525b9e3dc99e75067b8fcd89718d8c5 Mon Sep 17 00:00:00 2001 From: Noon van der Silk Date: Fri, 13 Sep 2024 10:14:49 +0100 Subject: [PATCH 3/3] Pass arguments correctly to nix run --- .github/workflows/network-test.yaml | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/.github/workflows/network-test.yaml b/.github/workflows/network-test.yaml index 156ae84e47a..27a2b1557fc 100644 --- a/.github/workflows/network-test.yaml +++ b/.github/workflows/network-test.yaml @@ -62,6 +62,8 @@ jobs: - name: Setup containers for network testing run: | + set -exo pipefail + cd demo ./prepare-devnet.sh docker compose up -d cardano-node @@ -74,9 +76,10 @@ jobs: --node-socket devnet/node.socket \ --cardano-signing-key devnet/credentials/faucet.sk) - echo "HYDRA_SCRIPTS_TX_ID=$HYDRA_SCRIPTS_TX_ID" >> .env + echo "HYDRA_SCRIPTS_TX_ID=$HYDRA_SCRIPTS_TX_ID" > .env - nix run .#cardano-cli query protocol-parameters \ + nix run .#cardano-cli -- query protocol-parameters \ + --testnet-magic 42 \ --socket-path devnet/node.socket \ --out-file /dev/stdout \ | jq ".txFeeFixed = 0 | .txFeePerByte = 0 | .executionUnitPrices.priceMemory = 0 | .executionUnitPrices.priceSteps = 0" \