Skip to content

Commit

Permalink
bump node counts to run more tests in parallel
Browse files Browse the repository at this point in the history
  • Loading branch information
tateexon committed Sep 12, 2023
1 parent e413ab4 commit 5baf181
Show file tree
Hide file tree
Showing 4 changed files with 52 additions and 22 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/integration-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -158,8 +158,8 @@ jobs:
id: build-test-matrix-list
run: |
cd ./integration-tests
MATRIX_JSON_AUTOMATION=$(./scripts/buildTestMatrixList.sh ./smoke/automation_test.go automation ubuntu20.04-8cores-32GB)
MATRIX_JSON_KEEPER=$(./scripts/buildTestMatrixList.sh ./smoke/keeper_test.go keeper ubuntu20.04-8cores-32GB)
MATRIX_JSON_AUTOMATION=$(./scripts/buildTestMatrixList.sh ./smoke/automation_test.go automation ubuntu20.04-8cores-32GB 1)
MATRIX_JSON_KEEPER=$(./scripts/buildTestMatrixList.sh ./smoke/keeper_test.go keeper ubuntu20.04-8cores-32GB 1)
COMBINED_ARRAY=$(jq -c -n "$MATRIX_JSON_AUTOMATION + $MATRIX_JSON_KEEPER")
echo "MATRIX_JSON=${COMBINED_ARRAY}" >> $GITHUB_ENV
eth-smoke-tests-matrix-automation:
Expand Down
10 changes: 7 additions & 3 deletions integration-tests/scripts/buildTestMatrixList.sh
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ cd "$SCRIPT_DIR"/../ || exit 1
FILENAME=$1
MATRIX_JOB_NAME=$2
NODE_LABEL=$3
NODE_COUNT=$4

# Get list of test names from JSON file
JSONFILE="${FILENAME}_test_list.json"
Expand All @@ -25,15 +26,18 @@ matrix_output() {
local job_name=$2
local test_name=$3
local node_label=$4
local node_count=$5
local counter_out=$(printf "%02d\n" $counter)
echo -n "{\"name\": \"${job_name}-${counter_out}\", \"file\": \"${job_name}\",\"nodes\": 1, \"os\": \"${node_label}\", \"pyroscope_env\": \"ci-smoke-${job_name}-evm-simulated\", \"run\": \"-run '^${test_name}$'\"}"
echo -n "{\"name\": \"${job_name}-${counter_out}\", \"file\": \"${job_name}\",\"nodes\": ${node_count}, \"os\": \"${node_label}\", \"pyroscope_env\": \"ci-smoke-${job_name}-evm-simulated\", \"run\": \"-run '^${test_name}$'\"}"
}

# Read the JSON file and loop through 'tests' and 'run'
jq -c '.tests[]' ${JSONFILE} | while read -r test; do
testName=$(echo ${test} | jq -r '.name')
label=$(echo ${test} | jq -r '.label // empty')
effective_node_label=${label:-$NODE_LABEL}
node_count=$(echo ${test} | jq -r '.nodes // empty')
effective_node_count=${node_count:-$NODE_COUNT}
subTests=$(echo ${test} | jq -r '.run[]?.name // empty')
output=""

Expand All @@ -43,14 +47,14 @@ jq -c '.tests[]' ${JSONFILE} | while read -r test; do
if [ $COUNTER -ne 1 ]; then
echo -n ","
fi
matrix_output $COUNTER $MATRIX_JOB_NAME "${testName}/${subTest}" ${effective_node_label}
matrix_output $COUNTER $MATRIX_JOB_NAME "${testName}/${subTest}" ${effective_node_label} ${effective_node_count}
((COUNTER++))
done
else
if [ $COUNTER -ne 1 ]; then
echo -n ","
fi
matrix_output $COUNTER $MATRIX_JOB_NAME "${testName}" ${effective_node_label}
matrix_output $COUNTER $MATRIX_JOB_NAME "${testName}" ${effective_node_label} ${effective_node_count}
((COUNTER++))
fi

Expand Down
28 changes: 20 additions & 8 deletions integration-tests/smoke/automation_test.go_test_list.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,31 +2,43 @@
"tests": [
{
"name": "TestAutomationBasic",
"label": "ubuntu20.04-32cores-128GB"
"label": "ubuntu20.04-32cores-128GB",
"nodes": 3
},
{
"name": "TestAutomationAddFunds"
"name": "TestAutomationAddFunds",
"label": "ubuntu20.04-16cores-64GB",
"nodes": 2
},
{
"name": "TestAutomationPauseUnPause",
"label": "ubuntu20.04-16cores-64GB"
"label": "ubuntu20.04-16cores-64GB",
"nodes": 2
},
{
"name": "TestAutomationRegisterUpkeep"
"name": "TestAutomationRegisterUpkeep",
"label": "ubuntu20.04-16cores-64GB",
"nodes": 2
},
{
"name": "TestAutomationPauseRegistry"
"name": "TestAutomationPauseRegistry",
"label": "ubuntu20.04-16cores-64GB",
"nodes": 2
},
{
"name": "TestAutomationKeeperNodesDown",
"label": "ubuntu20.04-16cores-64GB"
"label": "ubuntu20.04-16cores-64GB",
"nodes": 2
},
{
"name": "TestAutomationPerformSimulation"
"name": "TestAutomationPerformSimulation",
"label": "ubuntu20.04-16cores-64GB",
"nodes": 2
},
{
"name": "TestAutomationCheckPerformGasLimit",
"label": "ubuntu20.04-16cores-64GB"
"label": "ubuntu20.04-16cores-64GB",
"nodes": 2
},
{
"name": "TestUpdateCheckData"
Expand Down
32 changes: 23 additions & 9 deletions integration-tests/smoke/keeper_test.go_test_list.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,37 +2,51 @@
"tests": [
{
"name": "TestKeeperBasicSmoke",
"label": "ubuntu20.04-32cores-128GB"
"label": "ubuntu20.04-32cores-128GB",
"nodes": 3
},
{
"name": "TestKeeperBlockCountPerTurn",
"label": "ubuntu20.04-32cores-128GB"
"label": "ubuntu20.04-32cores-128GB",
"nodes": 3
},
{
"name": "TestKeeperSimulation"
"name": "TestKeeperSimulation",
"label": "ubuntu20.04-16cores-64GB",
"nodes": 2
},
{
"name": "TestKeeperCheckPerformGasLimit",
"label": "ubuntu20.04-16cores-64GB"
"label": "ubuntu20.04-16cores-64GB",
"nodes": 3
},
{
"name": "TestKeeperRegisterUpkeep"
"name": "TestKeeperRegisterUpkeep",
"label": "ubuntu20.04-16cores-64GB",
"nodes": 3
},
{
"name": "TestKeeperAddFunds"
"name": "TestKeeperAddFunds",
"label": "ubuntu20.04-16cores-64GB",
"nodes": 3
},
{
"name": "TestKeeperRemove"
"name": "TestKeeperRemove",
"label": "ubuntu20.04-16cores-64GB",
"nodes": 3
},
{
"name": "TestKeeperPauseRegistry"
"name": "TestKeeperPauseRegistry",
"label": "ubuntu20.04-16cores-64GB",
"nodes": 2
},
{
"name": "TestKeeperMigrateRegistry"
},
{
"name": "TestKeeperNodeDown",
"label": "ubuntu20.04-32cores-128GB"
"label": "ubuntu20.04-32cores-128GB",
"nodes": 3
},
{
"name": "TestKeeperPauseUnPauseUpkeep"
Expand Down

0 comments on commit 5baf181

Please sign in to comment.