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

Split automation-01 ci job out to multiple jobs #11694

Merged
merged 1 commit into from
Jan 5, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
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
Loading