Skip to content

Commit

Permalink
Split automation-01 ci job out to multiple (#11694)
Browse files Browse the repository at this point in the history
  • Loading branch information
tateexon authored Jan 5, 2024
1 parent 094b252 commit 3e944c9
Show file tree
Hide file tree
Showing 3 changed files with 62 additions and 38 deletions.
24 changes: 13 additions & 11 deletions integration-tests/scripts/buildTestMatrixList.sh
Original file line number Diff line number Diff line change
Expand Up @@ -40,24 +40,26 @@ jq -c '.tests[]' ${JSONFILE} | while read -r test; do
effective_node_count=${node_count:-$NODE_COUNT}
subTests=$(echo ${test} | jq -r '.run[]?.name // empty')
output=""

if [ $COUNTER -ne 1 ]; then
echo -n ","
fi

# Loop through subtests, if any, and print in the desired format
if [ -n "$subTests" ]; then
subTestString=""
subTestCounter=1
for subTest in $subTests; do
if [ $COUNTER -ne 1 ]; then
echo -n ","
if [ $subTestCounter -ne 1 ]; then
subTestString+="|"
fi
matrix_output $COUNTER $MATRIX_JOB_NAME "${testName}/${subTest}" ${effective_node_label} ${effective_node_count}
((COUNTER++))
subTestString+="${testName}\/${subTest}"
((subTestCounter++))
done
else
if [ $COUNTER -ne 1 ]; then
echo -n ","
fi
matrix_output $COUNTER $MATRIX_JOB_NAME "${testName}" ${effective_node_label} ${effective_node_count}
((COUNTER++))
testName="${subTestString}"
fi

matrix_output $COUNTER $MATRIX_JOB_NAME "${testName}" ${effective_node_label} ${effective_node_count}
((COUNTER++))
done > "./tmpout.json"
OUTPUT=$(cat ./tmpout.json)
echo "[${OUTPUT}]"
Expand Down
50 changes: 25 additions & 25 deletions integration-tests/smoke/automation_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -90,9 +90,9 @@ func SetupAutomationBasic(t *testing.T, nodeUpgrade bool) {
"registry_2_1_with_logtrigger_and_mercury_v02": ethereum.RegistryVersion_2_1,
}

for n, rv := range registryVersions {
name := n
registryVersion := rv
for name, registryVersion := range registryVersions {
name := name
registryVersion := registryVersion
t.Run(name, func(t *testing.T) {
t.Parallel()
l := logging.GetTestLogger(t)
Expand Down Expand Up @@ -168,7 +168,7 @@ func SetupAutomationBasic(t *testing.T, nodeUpgrade bool) {
g.Expect(counter.Int64()).Should(gomega.BeNumerically(">=", int64(expect)),
"Expected consumer counter to be greater than %d, but got %d", expect, counter.Int64())
}
}, "5m", "1s").Should(gomega.Succeed()) // ~1m for cluster setup, ~2m for performing each upkeep 5 times, ~2m buffer
}, "10m", "1s").Should(gomega.Succeed()) // ~1m for cluster setup, ~2m for performing each upkeep 5 times, ~2m buffer

l.Info().Msgf("Total time taken to get 5 performs for each upkeep: %s", time.Since(startTime))

Expand Down Expand Up @@ -400,9 +400,9 @@ func TestAutomationAddFunds(t *testing.T) {
"registry_2_1": ethereum.RegistryVersion_2_1,
}

for n, rv := range registryVersions {
name := n
registryVersion := rv
for name, registryVersion := range registryVersions {
name := name
registryVersion := registryVersion
t.Run(name, func(t *testing.T) {
t.Parallel()
a := setupAutomationTestDocker(
Expand Down Expand Up @@ -557,9 +557,9 @@ func TestAutomationRegisterUpkeep(t *testing.T) {
"registry_2_1": ethereum.RegistryVersion_2_1,
}

for n, rv := range registryVersions {
name := n
registryVersion := rv
for name, registryVersion := range registryVersions {
name := name
registryVersion := registryVersion
t.Run(name, func(t *testing.T) {
t.Parallel()
l := logging.GetTestLogger(t)
Expand Down Expand Up @@ -641,9 +641,9 @@ func TestAutomationPauseRegistry(t *testing.T) {
"registry_2_1": ethereum.RegistryVersion_2_1,
}

for n, rv := range registryVersions {
name := n
registryVersion := rv
for name, registryVersion := range registryVersions {
name := name
registryVersion := registryVersion
t.Run(name, func(t *testing.T) {
t.Parallel()
a := setupAutomationTestDocker(
Expand Down Expand Up @@ -710,9 +710,9 @@ func TestAutomationKeeperNodesDown(t *testing.T) {
"registry_2_1": ethereum.RegistryVersion_2_1,
}

for n, rv := range registryVersions {
name := n
registryVersion := rv
for name, registryVersion := range registryVersions {
name := name
registryVersion := registryVersion
t.Run(name, func(t *testing.T) {
t.Parallel()
l := logging.GetTestLogger(t)
Expand Down Expand Up @@ -810,9 +810,9 @@ func TestAutomationPerformSimulation(t *testing.T) {
"registry_2_1": ethereum.RegistryVersion_2_1,
}

for n, rv := range registryVersions {
name := n
registryVersion := rv
for name, registryVersion := range registryVersions {
name := name
registryVersion := registryVersion
t.Run(name, func(t *testing.T) {
t.Parallel()
a := setupAutomationTestDocker(
Expand Down Expand Up @@ -873,9 +873,9 @@ func TestAutomationCheckPerformGasLimit(t *testing.T) {
"registry_2_1": ethereum.RegistryVersion_2_1,
}

for n, rv := range registryVersions {
name := n
registryVersion := rv
for name, registryVersion := range registryVersions {
name := name
registryVersion := registryVersion
t.Run(name, func(t *testing.T) {
t.Parallel()
l := logging.GetTestLogger(t)
Expand Down Expand Up @@ -987,9 +987,9 @@ func TestUpdateCheckData(t *testing.T) {
"registry_2_1": ethereum.RegistryVersion_2_1,
}

for n, rv := range registryVersions {
name := n
registryVersion := rv
for name, registryVersion := range registryVersions {
name := name
registryVersion := registryVersion
t.Run(name, func(t *testing.T) {
t.Parallel()
l := logging.GetTestLogger(t)
Expand Down
26 changes: 24 additions & 2 deletions integration-tests/smoke/automation_test.go_test_list.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,30 @@
"tests": [
{
"name": "TestAutomationBasic",
"label": "ubuntu-latest-32cores-128GB",
"nodes": 6
"label": "ubuntu-latest",
"nodes": 2,
"run":[
{"name":"registry_2_0"},
{"name":"registry_2_1_conditional"}
]
},
{
"name": "TestAutomationBasic",
"label": "ubuntu-latest",
"nodes": 2,
"run":[
{"name":"registry_2_1_logtrigger"},
{"name":"registry_2_1_with_mercury_v02"}
]
},
{
"name": "TestAutomationBasic",
"label": "ubuntu-latest",
"nodes": 2,
"run":[
{"name":"registry_2_1_with_mercury_v03"},
{"name":"registry_2_1_with_logtrigger_and_mercury_v02"}
]
},
{
"name": "TestSetUpkeepTriggerConfig"
Expand Down

0 comments on commit 3e944c9

Please sign in to comment.