Skip to content

Commit

Permalink
ci: add test for ng spin up sequencing
Browse files Browse the repository at this point in the history
  • Loading branch information
johnalotoski committed Jan 16, 2025
1 parent fd02934 commit d3476f2
Show file tree
Hide file tree
Showing 2 changed files with 29 additions and 8 deletions.
16 changes: 16 additions & 0 deletions .github/workflows/nix-jobs-test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,14 @@ jobs:
"job-update-proposal-hard-fork"
)
JOB_SEQ_NG=(
"job-gen-custom-node-config-data-ng"
"job-create-stake-pool-keys"
"job-register-stake-pools"
"job-delegate-rewards-stake-key"
"job-retire-bootstrap-pool"
)
RUN_TESTS() {
local JOBS=("$@")
Expand Down Expand Up @@ -110,3 +118,11 @@ jobs:
echo "Running sequence tests on pre-release..."
RUN_TESTS "${JOB_SEQ[@]}"
echo "Running next-gen sequence tests with pre-release versioning..."
set -x
export ERA_CMD="conway"
export BOOTSTRAP_POOL_DIR="$KEY_DIR/bootstrap-pool"
export RICH_KEY="$KEY_DIR/utxo-keys/rich-utxo"
set +x
RUN_TESTS "${JOB_SEQ_NG[@]}"
21 changes: 13 additions & 8 deletions flakeModules/jobs.nix
Original file line number Diff line number Diff line change
Expand Up @@ -1280,6 +1280,7 @@ in {
# [$UNSTABLE]
# [$USE_DECRYPTION]
# [$USE_SHELL_BINS]
# [$UTXO]
[ -n "''${DEBUG:-}" ] && set -x
Expand All @@ -1295,13 +1296,17 @@ in {
# There is only a single shelley delegator UTxO created as part of
# the job-gen-custom-node-config-data-ng workflow.
UTXO=$(
"''${CARDANO_CLI[@]}" query utxo \
--address "$(eval cat "$(decrypt_check "$BOOTSTRAP_POOL_PAYMENT_KEY.addr")")" \
--testnet-magic "$TESTNET_MAGIC" \
--out-file /dev/stdout \
| jq -r 'to_entries[0].key'
)
if [ -z "''${UTXO:-}" ]; then
UTXO=$(
"''${CARDANO_CLI[@]}" query utxo \
--address "$(eval cat "$(decrypt_check "$BOOTSTRAP_POOL_PAYMENT_KEY.addr")")" \
--testnet-magic "$TESTNET_MAGIC" \
--out-file /dev/stdout \
| jq -r 'to_entries
| [{"txin": .key, "address": .value.address, "amount": .value.value.lovelace}][0]'
)
fi
TXIN=$(jq -r '.txin' <<< "$UTXO")
# Apparently, the genesis-declared delegator stake key cannot be
# registered, deregistered or have rewards withdrawn, so we
Expand All @@ -1313,7 +1318,7 @@ in {
--out-file pool-dereg.cert
"''${CARDANO_CLI[@]}" transaction build \
--tx-in "$UTXO" \
--tx-in "$TXIN" \
--certificate-file pool-dereg.cert \
--change-address "$(eval cat "$(decrypt_check "$RICH_KEY.addr")")" \
--out-file tx.raw
Expand Down

0 comments on commit d3476f2

Please sign in to comment.