Skip to content

Commit 4dc8682

Browse files
authored
[CRE-876, 913, 963, 964, 989] Parallelize regression system-tests, run them by default. (#19578)
* [CRE-964] Parallelize regression system-tests * [CRE-963] Run 'regression' system-tests by default and opt-out on 'skip-e2e-regression' * [CRE-876] Delete system-test workflows v2 from v2 registries * [CRE-913, CRE-989] Add negative system tests for evm.FilterLogs
1 parent ecbeae9 commit 4dc8682

File tree

15 files changed

+742
-341
lines changed

15 files changed

+742
-341
lines changed

.changeset/tiny-insects-judge.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"chainlink": minor
3+
---
4+
5+
#internal Parallelize CRE regression system-tests

.github/workflows/cre-regression-system-tests.yaml

Lines changed: 15 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -64,8 +64,6 @@ jobs:
6464
id: define-matrix
6565
shell: bash
6666
working-directory: system-tests/tests
67-
env:
68-
WITH_REGRESSION: ${{ inputs.with_regression }}
6967
run: |
7068
test_names=$(go test \
7169
github.com/smartcontractkit/chainlink/system-tests/tests/regression/cre \
@@ -78,7 +76,7 @@ jobs:
7876
| map({
7977
test_name: .value,
8078
test_id: .key,
81-
cre_version: (if (.value | test("V2")) then "v2" else "v1" end)
79+
cre_version: (if (.value | test("V1")) then "v1" else "v2" end)
8280
})
8381
')
8482
@@ -157,18 +155,18 @@ jobs:
157155
E2E_JD_VERSION: "0.12.7"
158156
E2E_TEST_CHAINLINK_IMAGE: "${{ secrets.QA_AWS_ACCOUNT_NUMBER }}.dkr.ecr.${{ secrets.QA_AWS_REGION }}.amazonaws.com/${{ inputs.ecr_name }}"
159157
E2E_TEST_CHAINLINK_VERSION: ${{ inputs.chainlink_image_tag != '' && inputs.chainlink_image_tag || inputs.chainlink_version }}
160-
CTF_CONFIGS: configs/workflow-gateway-capabilities-don.toml
158+
CTF_CONFIGS: configs/workflow-gateway-don.toml
161159
CRE_VERSION: ${{ matrix.tests.cre_version }}
162160
TEST_NAME: ${{ matrix.tests.test_name }}
163161
run: |
164162
cd core/scripts/cre/environment
165163
166164
# Start CRE with the appropriate contracts version (i.e. Workflow/CapabilityRegistry)
167165
if [[ "${CRE_VERSION}" == "v1" ]]; then
168-
echo "Starting CRE with v1 contracts for test: '${TEST_NAME}'"
166+
echo "Starting CRE with v1 contracts for test: '${TEST_NAME}' and configs: '${CTF_CONFIGS}'"
169167
go run . env start --with-plugins-docker-image "${E2E_TEST_CHAINLINK_IMAGE}:${E2E_TEST_CHAINLINK_VERSION}"
170168
else
171-
echo "Starting CRE with v2 contracts for test: '${TEST_NAME}'"
169+
echo "Starting CRE with v2 contracts for test: '${TEST_NAME}' and configs: '${CTF_CONFIGS}'"
172170
go run . env start --with-plugins-docker-image "${E2E_TEST_CHAINLINK_IMAGE}:${E2E_TEST_CHAINLINK_VERSION}" --with-contracts-version v2
173171
fi
174172
@@ -179,28 +177,36 @@ jobs:
179177
fi
180178
181179
- name: Run CRE${{ matrix.tests.cre_version }} Regression system tests
180+
id: run-regression-tests
182181
shell: bash
183182
working-directory: system-tests/tests
184183
env:
185184
TEST_NAME: ${{ matrix.tests.test_name }}
186-
TEST_TIMEOUT: 200m
185+
TEST_TIMEOUT: 30m
187186
run: |
187+
echo "Starting test: '${TEST_NAME}'"
188188
gotestsum \
189189
--jsonfile=/tmp/gotest-regression.log \
190190
--junitfile=/tmp/junit-report-regression.xml \
191191
--format=github-actions \
192192
-- \
193193
-v -run "^(${TEST_NAME})$" -timeout ${TEST_TIMEOUT} -count=1 -parallel=1 \
194194
github.com/smartcontractkit/chainlink/system-tests/tests/regression/cre
195+
196+
exit_code=$?
197+
if [ $exit_code -eq 0 ]; then
198+
echo "tests_result=✅ Tests passed" >> $GITHUB_OUTPUT
199+
fi
200+
exit $exit_code
195201
196-
- name: Process and upload flaky Regression tests results
202+
- name: Process and upload flaky Regression tests results (${{ steps.run-regression-tests.outputs.tests_result }})
197203
if: ${{ !cancelled() }}
198204
uses: smartcontractkit/.github/actions/branch-out-upload@branch-out-upload/0.1.0
199205
with:
200206
junit-file-path: "/tmp/junit-report-regression.xml"
201207
trunk-org-slug: chainlink
202208
trunk-token: ${{ secrets.TRUNK_API_KEY }}
203-
trunk-previous-step-outcome: ${{ steps.run-tests.outcome }}
209+
trunk-previous-step-outcome: ${{ steps.run-regression-tests.outcome }}
204210
trunk-job-url: ${{ format('https://github.com/{0}/actions/runs/{1}/jobs/{2}', github.repository, github.run_id, job.check_run_id) }}
205211
# when auto-quarantine is enabled, allow this to determine test failures
206212
trunk-upload-only: ${{ env.ENABLE_AUTO_QUARANTINE != 'true' }}

.github/workflows/cre-system-tests.yaml

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -77,10 +77,10 @@ jobs:
7777
7878
# Add list of tests with certain topologies
7979
PER_TEST_TOPOLOGIES_JSON=${PER_TEST_TOPOLOGIES_JSON:-'{
80-
"Test_CRE_Suite_V1_SecureMint": [
80+
"Test_CRE_V1_SecureMint": [
8181
{"topology":"workflow","configs":"configs/workflow-solana-don.toml"}
8282
],
83-
"Test_CRE_Suite_V1_Tron": [
83+
"Test_CRE_V1_Tron": [
8484
{"topology":"workflow","configs":"configs/workflow-don-tron.toml"}
8585
]
8686
}'}
@@ -231,6 +231,7 @@ jobs:
231231
TEST_TIMEOUT: 30m
232232
RUN_QUARANTINED_TESTS: "true" # always run quarantined tests in CI
233233
run: |
234+
echo "Starting test: '${TEST_NAME}'"
234235
gotestsum \
235236
--jsonfile=/tmp/gotest.log \
236237
--junitfile=/tmp/junit-report.xml \
@@ -239,7 +240,12 @@ jobs:
239240
-v -run "^(${TEST_NAME})$" -timeout "${TEST_TIMEOUT}" -count=1 -parallel=1 \
240241
github.com/smartcontractkit/chainlink/system-tests/tests/smoke/cre
241242
242-
- name: Process and upload flaky Smoke test results
243+
exit_code=$?
244+
if [ $exit_code -eq 0 ]; then
245+
echo "tests_result=✅ Tests passed" >> $GITHUB_OUTPUT
246+
fi
247+
248+
- name: Process and upload flaky Regression tests results (${{ steps.run-tests.outputs.tests_result }})
243249
if: ${{ !cancelled() }}
244250
uses: smartcontractkit/.github/actions/branch-out-upload@branch-out-upload/0.1.0
245251
with:

.github/workflows/integration-tests.yml

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -158,12 +158,12 @@ jobs:
158158
with:
159159
check-label: "run-e2e-tests"
160160

161-
- name: Get PR Labels (run-e2e-regression)
161+
- name: Get PR Labels (skip-e2e-regression)
162162
if: github.event_name == 'pull_request'
163163
id: label-runs-e2e-regression
164164
uses: smartcontractkit/.github/actions/get-pr-labels@get-pr-labels/v1
165165
with:
166-
check-label: "run-e2e-regression"
166+
check-label: "skip-e2e-regression"
167167

168168
- name: Set runner labels
169169
id: runner-labels
@@ -310,11 +310,13 @@ jobs:
310310
# Run Core CRE E2E tests on PRs if there are relevant changes
311311
if [[ "${CONTAINS_CHANGES}" == 'true' ]]; then
312312
echo "should-run=true" | tee -a "$GITHUB_OUTPUT"
313+
echo "with-regression=true" | tee -a "$GITHUB_OUTPUT"
313314
fi
315+
# Opt-out of CRE regression tests if the label 'skip-e2e-regression' is found
314316
if [[ "${RUN_E2E_TESTS_REGRESSION_LABEL_FOUND}" == 'true' ]]; then
315-
echo "Running CRE regression tests as the label 'run-e2e-regression' is found"
317+
echo "Skipping CRE regression tests: label 'skip-e2e-regression' is found"
316318
echo "should-run=true" | tee -a "$GITHUB_OUTPUT"
317-
echo "with-regression=true" | tee -a "$GITHUB_OUTPUT"
319+
echo "with-regression=false" | tee -a "$GITHUB_OUTPUT"
318320
fi
319321
320322
elif [[ "${GITHUB_EVENT_NAME}" == 'merge_group' ]]; then

0 commit comments

Comments
 (0)