Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

run only fast checks in rosetta int tests #14224

Merged
merged 49 commits into from
Oct 23, 2023
Merged
Show file tree
Hide file tree
Changes from 47 commits
Commits
Show all changes
49 commits
Select commit Hold shift + click to select a range
5dfb734
run only fast checks in rosetta int tests
dkijania Sep 27, 2023
6118445
add fast script for rosetta
dkijania Sep 27, 2023
1d47673
Merge branch 'berkeley' into dkijania/tailor_rosetta_int_tests
dkijania Sep 27, 2023
1d89857
correct path
dkijania Sep 28, 2023
287fdc4
Update rosetta-integration-tests-fast.sh
dkijania Sep 28, 2023
2109210
more validations
dkijania Sep 30, 2023
591b5bf
update counte
dkijania Sep 30, 2023
536d242
Revert "Auxiliary commit to revert individual files from 591b5bfb040d…
dkijania Oct 2, 2023
4066dc1
add quick test with minimal checks and no zkapps use for pull request…
dkijania Oct 2, 2023
32e266f
compilation fixes
dkijania Oct 2, 2023
356d7da
remove leftovers
dkijania Oct 2, 2023
e4ba43a
remove comment
dkijania Oct 2, 2023
6b55520
Merge branch 'berkeley' into dkijania/tailor_rosetta_int_tests
dkijania Oct 2, 2023
528e0bf
remove zkapps completely
dkijania Oct 3, 2023
439ec8f
Merge branch 'berkeley' into dkijania/tailor_rosetta_int_tests
dkijania Oct 3, 2023
daeaf73
Use zkapp_test_transaction for Rosetta integration tests (debug attem…
shimkiv Oct 5, 2023
43dec12
Merge branch 'berkeley' into dkijania/tailor_rosetta_int_tests
shimkiv Oct 5, 2023
d850951
Typo.
shimkiv Oct 5, 2023
16716c9
Typo.
shimkiv Oct 5, 2023
47e96fd
Sending zkapp txns agaisnt Daemon's GraphQL endpoint.
shimkiv Oct 5, 2023
f07fa96
Let's try with Python.
shimkiv Oct 5, 2023
e59e805
python3 -> python
shimkiv Oct 5, 2023
3403057
Install python.
shimkiv Oct 5, 2023
1ba5689
Install python.
shimkiv Oct 5, 2023
645a768
Install python and deps when needed (debugging attempt).
shimkiv Oct 5, 2023
b6a842a
Escaping quotes with jq.
shimkiv Oct 6, 2023
2d7a523
Tested network comms locally.
shimkiv Oct 6, 2023
b3f59d4
Merge branch 'berkeley' into dkijania/tailor_rosetta_int_tests
shimkiv Oct 6, 2023
e0286bd
Merge branch 'berkeley' into dkijania/tailor_rosetta_int_tests
dkijania Oct 9, 2023
d45ab3e
Merge branch 'berkeley' into dkijania/tailor_rosetta_int_tests
dkijania Oct 9, 2023
535358f
test full in PR
dkijania Oct 9, 2023
b829895
Merge remote-tracking branch 'origin/dkijania/tailor_rosetta_int_test…
dkijania Oct 9, 2023
0ebb8a6
log statements in rosetta
dkijania Oct 10, 2023
5b1cfc4
Merge branch 'berkeley' into dkijania/tailor_rosetta_int_tests
dkijania Oct 10, 2023
0ee21c1
[rosetta] Fix broken SQL quesry for zkapp account updates.
Sventimir Oct 18, 2023
a54d385
lint mode parameter and exclude sending transactions from minimal mode
dkijania Oct 18, 2023
e81a87a
Merge branch 'berkeley' into dkijania/tailor_rosetta_int_tests
dkijania Oct 18, 2023
bf808a2
Merge branch 'berkeley' into dkijania/tailor_rosetta_int_tests
dkijania Oct 18, 2023
2f8aaa4
Merge branch 'berkeley' into dkijania/tailor_rosetta_int_tests
dkijania Oct 19, 2023
33a6e76
Merge branch 'berkeley' into dkijania/tailor_rosetta_int_tests
dkijania Oct 19, 2023
9c10904
add zkapp test transaction
dkijania Oct 19, 2023
b45f07a
use correct deb
dkijania Oct 19, 2023
c9c3bb8
add missing keys
dkijania Oct 19, 2023
0cc7951
revert running fast checks on PR
dkijania Oct 20, 2023
ee50c21
Merge branch 'berkeley' into dkijania/tailor_rosetta_int_tests
dkijania Oct 20, 2023
804af42
Merge branch 'berkeley' into dkijania/tailor_rosetta_int_tests
dkijania Oct 20, 2023
f5aa2c6
Merge branch 'berkeley' into dkijania/tailor_rosetta_int_tests
dkijania Oct 22, 2023
026d538
adjusting DirtyWhen
dkijania Oct 23, 2023
e6f7388
Merge remote-tracking branch 'origin/dkijania/tailor_rosetta_int_test…
dkijania Oct 23, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions buildkite/scripts/rosetta-integration-tests-fast.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
buildkite/scripts/rosetta-integration-tests.sh --mode=minimal
1 change: 1 addition & 0 deletions buildkite/scripts/rosetta-integration-tests-full.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
buildkite/scripts/rosetta-integration-tests.sh --mode=full
237 changes: 78 additions & 159 deletions buildkite/scripts/rosetta-integration-tests.sh
Original file line number Diff line number Diff line change
@@ -1,21 +1,22 @@
#!/bin/bash

# Deploy a sandboxed Mina daemon with an archive and a Rosetta instance.
# Deploy 2 zkApps from https://github.com/MinaProtocol/rosetta-integration-test-zkapps
# to the network, interact with them and add some regular transactions.
# Then run full rosetta-cli tests against the Rosetta instance.

# NPM and NodeJS are installed through NVM, versions are stored in environment
# variables below. Zkapp-cli is installed globally through NPM, however, to
# ensure compatibility with the daemon, we use o1js pinned in the Mina repo.
# The repo is mounted into the container at /workdir, so we can build o1js from
# that source. It is important to make sure that the zkapp-cli version installed
# is compatible with o1js version used.
set -eox pipefail

# These tests use the mina binary, as rosetta-cli assumes we use a testnet.
# See https://github.com/coinbase/rosetta-sdk-go/blob/master/keys/signer_pallas.go#L222

set -eo pipefail
# Defines scope of test. Currently supported are:
# - minimal -> only quick checks (~5 mins)
# - full -> all checks
MODE="minimal"

while [ $# -gt 0 ]; do
case "$1" in
--mode=*)
MODE="${1#*=}"
;;
esac
shift
done

export MINA_NETWORK=${MINA_NETWORK:=sandbox}
export LOG_LEVEL="${LOG_LEVEL:=Info}"
Expand Down Expand Up @@ -47,43 +48,6 @@ export MINA_CONFIG_FILE=$HOME/${MINA_NETWORK}.json
export MINA_CONFIG_DIR="${MINA_CONFIG_DIR:=$HOME/.mina-config}"
export MINA_GRAPHQL_PORT=${MINA_GRAPHQL_PORT:=3085}

# Test variables
export ROSETTA_INT_TEST_ZKAPPS_VERSION=${ROSETTA_INT_TEST_ZKAPPS_VERSION:=rosetta-ci-tests}

# We need a version which is compatible with o1js pinned to the Mina repo.
# Should be set to 'latest' most of the time, but occasionally we might need
# an older one.
export ZKAPP_CLI_VERSION=0.11.0

# Nodejs variables
export NVM_VERSION=0.39.3
export NODE_VERSION=20.6.1

# zkApps variables
export ZKAPP_PATH=$HOME/zkapps

echo "=========================== INSTALLING NPM ==========================="
curl -so- https://raw.githubusercontent.com/nvm-sh/nvm/v${NVM_VERSION}/install.sh | bash &>/dev/null
export NVM_DIR="$HOME/.nvm"
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" # This loads nvm
[ -s "$NVM_DIR/bash_completion" ] && \. "$NVM_DIR/bash_completion" # This loads nvm bash_completion

nvm install $NODE_VERSION
nvm use --delete-prefix $NODE_VERSION

mkdir ~/.npm-global
npm config set prefix '~/.npm-global'
export PATH=~/.npm-global/bin:$PATH

# Install zkapp-cli and Typescript compiler.
npm install --no-progress --global "zkapp-cli@${ZKAPP_CLI_VERSION}" "typescript@latest"

# Build o1js so that we can use it later.
pushd /workdir/src/lib/snarkyjs
npm ci
npm run build
popd

# Rosetta CLI variables
# Files from ROSETTA_CLI_CONFIG_FILES will be read from
# ROSETTA_CONFIGURATION_INPUT_DIR and some placeholders will be
Expand All @@ -95,10 +59,6 @@ ROSETTA_CLI_MAIN_CONFIG_FILE=${ROSETTA_CLI_MAIN_CONFIG_FILE:="config.json"}
# Frequency (in seconds) at which payment operations will be sent
TRANSACTION_FREQUENCY=10

# Fetch zkApps
curl -Ls https://github.com/MinaProtocol/rosetta-integration-test-zkapps/tarball/$ROSETTA_INT_TEST_ZKAPPS_VERSION | tar xz -C /tmp
mv /tmp/MinaProtocol-rosetta-integration-test-zkapps-* $ZKAPP_PATH

# Libp2p Keypair
echo "=========================== GENERATING KEYPAIR IN ${MINA_LIBP2P_KEYPAIR_PATH} ==========================="
mina libp2p generate-keypair -privkey-path $MINA_LIBP2P_KEYPAIR_PATH
Expand All @@ -108,9 +68,18 @@ echo "=========================== GENERATING GENESIS LEDGER FOR ${MINA_NETWORK}
mkdir -p $MINA_KEYS_PATH
mina advanced generate-keypair --privkey-path $MINA_KEYS_PATH/block-producer.key
mina advanced generate-keypair --privkey-path $MINA_KEYS_PATH/snark-producer.key
mina advanced generate-keypair --privkey-path $MINA_KEYS_PATH/zkapp-fee-payer.key
mina advanced generate-keypair --privkey-path $MINA_KEYS_PATH/zkapp-sender.key
mina advanced generate-keypair --privkey-path $MINA_KEYS_PATH/zkapp-account.key
chmod -R 0700 $MINA_KEYS_PATH
BLOCK_PRODUCER_PK=$(cat $MINA_KEYS_PATH/block-producer.key.pub)
SNARK_PRODUCER_PK=$(cat $MINA_KEYS_PATH/snark-producer.key.pub)
ZKAPP_FEE_PAYER_KEY=$MINA_KEYS_PATH/zkapp-fee-payer.key
ZKAPP_FEE_PAYER_PUB_KEY=$(cat ${ZKAPP_FEE_PAYER_KEY}.pub)
ZKAPP_SENDER_KEY=$MINA_KEYS_PATH/zkapp-sender.key
ZKAPP_SENDER_PUB_KEY=$(cat ${ZKAPP_SENDER_KEY}.pub)
ZKAPP_ACCOUNT_KEY=$MINA_KEYS_PATH/zkapp-account.key
ZKAPP_ACCOUNT_PUB_KEY=$(cat ${ZKAPP_ACCOUNT_KEY}.pub)

mkdir -p $MINA_CONFIG_DIR/wallets/store
cp $MINA_KEYS_PATH/block-producer.key $MINA_CONFIG_DIR/wallets/store/$BLOCK_PRODUCER_PK
Expand All @@ -123,24 +92,14 @@ cat <<EOF >"$MINA_CONFIG_FILE"
"name": "${MINA_NETWORK}",
"accounts": [
{ "pk": "${BLOCK_PRODUCER_PK}", "balance": "1000000", "delegate": null, "sk": null },
{ "pk": "${SNARK_PRODUCER_PK}", "balance": "2000000", "delegate": "${BLOCK_PRODUCER_PK}", "sk": null }
{ "pk": "${SNARK_PRODUCER_PK}", "balance": "2000000", "delegate": "${BLOCK_PRODUCER_PK}", "sk": null },
{ "pk": "${ZKAPP_FEE_PAYER_PUB_KEY}", "balance": "1000000", "delegate": null, "sk": null },
{ "pk": "${ZKAPP_SENDER_PUB_KEY}", "balance": "1000000", "delegate": null, "sk": null },
{ "pk": "${ZKAPP_ACCOUNT_PUB_KEY}", "balance": "1000000", "delegate": null, "sk": null }
]
}
}
EOF
for zkapp_path in ${ZKAPP_PATH}/*/; do
zkapp_path=${zkapp_path%/}
zkapp=$(basename $zkapp_path)
# Generate zkApp account keypair
mina advanced generate-keypair --privkey-path ${MINA_KEYS_PATH}/zkapp-${zkapp}-account.key
# Generate zkApp fee payer keypair
mina advanced generate-keypair --privkey-path ${MINA_KEYS_PATH}/zkapp-${zkapp}-fee-payer.key
zkapp_fee_payer_pk=$(cat $MINA_KEYS_PATH/zkapp-${zkapp}-fee-payer.key.pub)
line="[{ \"pk\": \"${zkapp_fee_payer_pk}\", \"balance\": \"10000\", \"delegate\": null, \"sk\": null }]"
jq ".ledger.accounts |= . + ${line}" $MINA_CONFIG_FILE >${MINA_CONFIG_FILE}.tmp
mv ${MINA_CONFIG_FILE}.tmp $MINA_CONFIG_FILE
done
cat $MINA_CONFIG_FILE | jq .

# Substitute placeholders in rosetta-cli configuration
ROSETTA_CONFIGURATION_OUTPUT_DIR=/tmp/rosetta-cli-config
Expand All @@ -160,11 +119,6 @@ done
echo "==================== IMPORTING GENESIS ACCOUNTS ======================"
mina accounts import --privkey-path $MINA_KEYS_PATH/block-producer.key --config-directory $MINA_CONFIG_DIR
mina accounts import --privkey-path $MINA_KEYS_PATH/snark-producer.key --config-directory $MINA_CONFIG_DIR
for zkapp_path in ${ZKAPP_PATH}/*/; do
zkapp_path=${zkapp_path%/}
zkapp=$(basename $zkapp_path)
mina accounts import --privkey-path $MINA_KEYS_PATH/zkapp-${zkapp}-fee-payer.key --config-directory $MINA_CONFIG_DIR
done

# Postgres
echo "========================= INITIALIZING POSTGRESQL ==========================="
Expand Down Expand Up @@ -222,100 +176,61 @@ until [ $daemon_status == "Synced" ]; do
echo "Daemon Status: ${daemon_status}"
done

send_zkapp_txn() {
local GRAPHQL_REQUEST="$1"
local ESCAPED_GRAPHQL_REQUEST="${GRAPHQL_REQUEST//\"/\\\"}"
local ENDPOINT="http://127.0.0.1:${MINA_GRAPHQL_PORT}/graphql"

curl -X POST \
-H "Content-Type: application/json" \
--data "{\"query\":\"$ESCAPED_GRAPHQL_REQUEST\"}" \
"$ENDPOINT"
}

echo "========================= ZKAPP ACCOUNT SETTING UP ==========================="
ZKAPP_TXN_QUERY=$(mina-zkapp-test-transaction create-zkapp-account --fee-payer-key ${ZKAPP_FEE_PAYER_KEY} --nonce 0 --sender-key ${ZKAPP_SENDER_KEY} --sender-nonce 0 --receiver-amount 1000 --zkapp-account-key ${ZKAPP_ACCOUNT_KEY} --fee 5 | sed 1,7d)
send_zkapp_txn "${ZKAPP_TXN_QUERY}"

# Unlock Genesis Accounts
echo "==================== UNLOCKING GENESIS ACCOUNTS ======================"
mina accounts unlock --public-key $BLOCK_PRODUCER_PK
mina accounts unlock --public-key $SNARK_PRODUCER_PK

# Start sending payments
send_payments() {

# Start sending value transfer transactions
send_value_transfer_txns() {
mina client send-payment -rest-server http://127.0.0.1:${MINA_GRAPHQL_PORT}/graphql -amount 1 -nonce 0 -receiver $BLOCK_PRODUCER_PK -sender $BLOCK_PRODUCER_PK
while true; do
sleep $TRANSACTION_FREQUENCY
mina client send-payment -rest-server http://127.0.0.1:${MINA_GRAPHQL_PORT}/graphql -amount 1 -receiver $BLOCK_PRODUCER_PK -sender $BLOCK_PRODUCER_PK
done
}
send_payments &

# Fee payer cache creation
echo "==================== PREPARE FEE PAYER CACHE ======================"
zkapp_fee_payer_pk=$(cat ${MINA_KEYS_PATH}/zkapp-${zkapp}-fee-payer.key.pub)
zkapp_fee_payer_privkey=$(mina advanced dump-keypair --privkey-path "${MINA_KEYS_PATH}/zkapp-${zkapp}-fee-payer.key" | sed -ne "s/Private key: //p")

mkdir -p /root/.cache/zkapp-cli/keys
echo -e "{\n \"privateKey\": \"${zkapp_fee_payer_privkey}\",\n \"publicKey\": \"${zkapp_fee_payer_pk}\"\n}" >/root/.cache/zkapp-cli/keys/sandbox.json

# Deploy zkApps
echo "==================== DEPLOYING ZKAPPS ======================"
echo "If this fails, it's likely due to incompatibility between the
o1js and zkapp-cli versions in use."
echo "NOTE: At the moment the daemon still has an old version of
snarkyjs pinned to it, so we cannot use the latest version of
zkapp-cli, which requires o1js. Once the pinned snarkyjs version
gets updated, this build will most likely fail and we will then
need to update the zkapp-cli version used here. This is
unfortunate, but necessary. Please delete this warning once it's
done." > /dev/stderr

deploy_txs=()
for zkapp_path in ${ZKAPP_PATH}/*/; do
zkapp_path=${zkapp_path%/}
zkapp=$(basename $zkapp_path)
echo "Deploying ${zkapp}..."

zkapp_account_pk=$(cat ${MINA_KEYS_PATH}/zkapp-${zkapp}-account.key.pub)
zkapp_account_privkey=$(mina advanced dump-keypair --privkey-path "${MINA_KEYS_PATH}/zkapp-${zkapp}-account.key" | sed -ne "s/Private key: //p")

mkdir -p ${zkapp_path}/keys
echo -e "{\n \"privateKey\": \"${zkapp_account_privkey}\",\n \"publicKey\": \"${zkapp_account_pk}\"\n}" >"${zkapp_path}/keys/sandbox.json"

cat <<EOF >"${zkapp_path}/config.json"
{
"version": 1,
"networks": {
"sandbox": {
"url": "http://127.0.0.1:${MINA_GRAPHQL_PORT}/graphql",
"keyPath": "keys/sandbox.json",
"feepayerKeyPath": "/root/.cache/zkapp-cli/keys/sandbox.json",
"feepayerAlias": "sandbox",
"fee": "1"
}
}
}
EOF
cd "$zkapp_path"
npm ci
npm run build
txn=$(zk deploy sandbox -y | sed -ne "s/https:\/\/berkeley.minaexplorer.com\/transaction\///p")
deploy_txs+=txn
cd -
echo "Done."
done
send_value_transfer_txns &
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Generating commands only makes sense if we run rosetta-cli check:data or check:construction.

Suggested change
send_value_transfer_txns &
if [[ "$MODE" == "full" ]]; then
send_value_transfer_txns &
fi


# TODO: wait until all zkApps deploy txns are included in a block

next_block_time=$(mina client status --json | jq '.next_block_production.timing[1].time' | tr -d '"')
curr_time=$(date +%s%N | cut -b1-13)
sleep_time=$((($next_block_time - $curr_time) / 1000))
echo "Sleeping for ${sleep_time}s until next block is created..."
sleep ${sleep_time}
# Start sending zkapp transactions
ZKAPP_FEE_PAYER_NONCE=1
ZKAPP_SENDER_NONCE=1
ZKAPP_STATE=0
send_zkapp_transactions() {
while true; do
ZKAPP_TXN_QUERY=$(mina-zkapp-test-transaction transfer-funds-one-receiver --fee-payer-key ${ZKAPP_FEE_PAYER_KEY} --nonce ${ZKAPP_FEE_PAYER_NONCE} --sender-key ${ZKAPP_SENDER_KEY} --sender-nonce ${ZKAPP_SENDER_NONCE} --receiver-amount 1 --fee 5 --receiver ${ZKAPP_ACCOUNT_PUB_KEY} | sed 1,5d)
send_zkapp_txn "${ZKAPP_TXN_QUERY}"
let ZKAPP_FEE_PAYER_NONCE++
let ZKAPP_SENDER_NONCE++

ZKAPP_TXN_QUERY=$(mina-zkapp-test-transaction update-state --fee-payer-key ${ZKAPP_FEE_PAYER_KEY} --nonce ${ZKAPP_FEE_PAYER_NONCE} --zkapp-account-key ${ZKAPP_SENDER_KEY} --zkapp-state ${ZKAPP_STATE} --fee 5 | sed 1,5d)
send_zkapp_txn "${ZKAPP_TXN_QUERY}"
let ZKAPP_FEE_PAYER_NONCE++
let ZKAPP_STATE++
done
}

# Start calling zkApp methods
echo "==================== INTERACTING WITH ZKAPPS ======================"
RECEIVER_PK=$BLOCK_PRODUCER_PK
for zkapp_path in ${ZKAPP_PATH}/*/; do
zkapp_path=${zkapp_path%/}
zkapp=$(basename $zkapp_path)
echo "Interacting with ${zkapp}..."

cd "$zkapp_path"
./interact.sh sandbox
cd -
echo "Done."
done
# There is no point to generate transaction just for minimal mode
if [[ "$MODE" == "full" ]]; then
send_zkapp_transactions &
fi

next_block_time=$(mina client status --json | jq '.next_block_production.timing[1].time' | tr -d '"')
curr_time=$(date +%s%N | cut -b1-13)
next_block_time=$(mina client status --json | jq '.next_block_production.timing[1].time' | tr -d '"') curr_time=$(date +%s%N | cut -b1-13)
sleep_time=$((($next_block_time - $curr_time) / 1000))
echo "Sleeping for ${sleep_time}s until next block is created..."
sleep ${sleep_time}
Expand All @@ -327,11 +242,15 @@ rosetta-cli configuration:validate ${ROSETTA_CONFIGURATION_FILE}
echo "========================= ROSETTA CLI: CHECK:SPEC ==========================="
rosetta-cli check:spec --all --configuration-file ${ROSETTA_CONFIGURATION_FILE}

echo "========================= ROSETTA CLI: CHECK:CONSTRUCTION ==========================="
rosetta-cli check:construction --configuration-file ${ROSETTA_CONFIGURATION_FILE}
if [[ "$MODE" == "full" ]]; then

echo "========================= ROSETTA CLI: CHECK:CONSTRUCTION ==========================="
rosetta-cli check:construction --configuration-file ${ROSETTA_CONFIGURATION_FILE}

echo "========================= ROSETTA CLI: CHECK:DATA ==========================="
rosetta-cli check:data --configuration-file ${ROSETTA_CONFIGURATION_FILE}

echo "========================= ROSETTA CLI: CHECK:DATA ==========================="
rosetta-cli check:data --configuration-file ${ROSETTA_CONFIGURATION_FILE}
echo "========================= ROSETTA CLI: CHECK:PERF ==========================="
echo "rosetta-cli check:perf" # Will run this command when tests are fully implemented

echo "========================= ROSETTA CLI: CHECK:PERF ==========================="
echo "rosetta-cli check:perf" # Will run this command when tests are fully implemented
fi
5 changes: 3 additions & 2 deletions buildkite/src/Jobs/Test/RosettaIntegrationTests.dhall
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,8 @@ let dirtyWhen = [
S.strictlyStart (S.contains "src/lib"),
S.strictlyStart (S.contains "src/app/archive"),
S.exactly "buildkite/src/Jobs/Test/RosettaIntegrationTests" "dhall",
S.exactly "buildkite/scripts/rosetta-integration-tests" "sh"
S.exactly "buildkite/scripts/rosetta-integration-tests" "sh",
S.exactly "buildkite/scripts/rosetta-integration-tests-long.sh" "sh"
]

let B/SoftFail = B.definitions/commandStep/properties/soft_fail/Type
Expand All @@ -41,7 +42,7 @@ Pipeline.build
Command.Config::{
commands = [
Cmd.run ("export MINA_DEB_CODENAME=bullseye && source ./buildkite/scripts/export-git-env-vars.sh && echo \\\${MINA_DOCKER_TAG}"),
Cmd.runInDocker Cmd.Docker::{image="gcr.io/o1labs-192920/mina-rosetta:\\\${MINA_DOCKER_TAG}", entrypoint=" --entrypoint buildkite/scripts/rosetta-integration-tests.sh"} "bash"
Cmd.runInDocker Cmd.Docker::{image="gcr.io/o1labs-192920/mina-rosetta:\\\${MINA_DOCKER_TAG}", entrypoint=" --entrypoint buildkite/scripts/rosetta-integration-tests-fast.sh"} "bash"
],
label = "Rosetta integration tests Bullseye"
, key = "rosetta-integration-tests-bullseye"
Expand Down
53 changes: 53 additions & 0 deletions buildkite/src/Jobs/Test/RosettaIntegrationTestsLong.dhall
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
let Prelude = ../../External/Prelude.dhall
let B = ../../External/Buildkite.dhall

let Cmd = ../../Lib/Cmds.dhall
let S = ../../Lib/SelectFiles.dhall

let Pipeline = ../../Pipeline/Dsl.dhall
let PipelineMode = ../../Pipeline/Mode.dhall
let JobSpec = ../../Pipeline/JobSpec.dhall

let Command = ../../Command/Base.dhall
let RunInToolchain = ../../Command/RunInToolchain.dhall
let Size = ../../Command/Size.dhall
let Libp2p = ../../Command/Libp2pHelperBuild.dhall
let DockerImage = ../../Command/DockerImage.dhall
let DebianVersions = ../../Constants/DebianVersions.dhall

let dirtyWhen = [
S.strictlyStart (S.contains "src/app/rosetta"),
S.strictlyStart (S.contains "src/lib"),
S.strictlyStart (S.contains "src/app/archive"),
S.exactly "buildkite/src/Jobs/Test/RosettaIntegrationTests" "dhall",
S.exactly "buildkite/scripts/rosetta-integration-tests" "sh",
S.exactly "buildkite/scripts/rosetta-integration-tests-fast.sh" "sh"
]

let B/SoftFail = B.definitions/commandStep/properties/soft_fail/Type

in

Pipeline.build
Pipeline.Config::
{ spec =
JobSpec::{
dirtyWhen = dirtyWhen,
path = "Test",
name = "RosettaIntegrationTestsLong",
mode = PipelineMode.Type.Stable
}
, steps = [
Command.build
Command.Config::{
commands = [
Cmd.run ("export MINA_DEB_CODENAME=bullseye && source ./buildkite/scripts/export-git-env-vars.sh && echo \\\${MINA_DOCKER_TAG}"),
Cmd.runInDocker Cmd.Docker::{image="gcr.io/o1labs-192920/mina-rosetta:\\\${MINA_DOCKER_TAG}", entrypoint=" --entrypoint buildkite/scripts/rosetta-integration-tests-full.sh"} "bash"
],
label = "Rosetta integration tests Bullseye Long"
, key = "rosetta-integration-tests-bullseye-long"
, target = Size.Small
, depends_on = [ { name = "MinaArtifactBullseye", key = "rosetta-bullseye-docker-image" } ]
}
]
}
Loading