From f1465328ffa6fb08aa4c449f10d945ba66ffff95 Mon Sep 17 00:00:00 2001 From: Roman Sysoev Date: Wed, 29 Apr 2026 22:10:59 +0300 Subject: [PATCH 1/2] test(ci): add pre-check system to CI workflow Signed-off-by: Roman Sysoev --- .github/workflows/e2e-reusable-pipeline.yml | 2 ++ test/e2e/Taskfile.yaml | 3 +++ test/e2e/scripts/precheck-prepare_ci.sh | 28 +++++++++++++++++++++ test/e2e/scripts/task_run_ci.sh | 7 +++--- 4 files changed, 37 insertions(+), 3 deletions(-) create mode 100755 test/e2e/scripts/precheck-prepare_ci.sh diff --git a/.github/workflows/e2e-reusable-pipeline.yml b/.github/workflows/e2e-reusable-pipeline.yml index e8e6662f4f..f4839bce4d 100644 --- a/.github/workflows/e2e-reusable-pipeline.yml +++ b/.github/workflows/e2e-reusable-pipeline.yml @@ -1281,6 +1281,8 @@ jobs: cp -a legacy/testdata /tmp/testdata + ./test/e2e/scripts/precheck-prepare_ci.sh + set +e FOCUS="${{ inputs.e2e_focus_tests }}" if [ -n "$FOCUS" ]; then diff --git a/test/e2e/Taskfile.yaml b/test/e2e/Taskfile.yaml index 0ea2c3ce5f..c8c1d2b890 100644 --- a/test/e2e/Taskfile.yaml +++ b/test/e2e/Taskfile.yaml @@ -34,10 +34,13 @@ tasks: run:ci: desc: "Separate task to run e2e tests in the CI environment" + env: + FOCUS: "VirtualMachineAdditionalNetworkInterfaces" deps: - copy - kubectl - d8 + - precheck:prepare cmds: - ./scripts/task_run_ci.sh diff --git a/test/e2e/scripts/precheck-prepare_ci.sh b/test/e2e/scripts/precheck-prepare_ci.sh new file mode 100755 index 0000000000..a37bd02722 --- /dev/null +++ b/test/e2e/scripts/precheck-prepare_ci.sh @@ -0,0 +1,28 @@ +#!/usr/bin/env bash + +# Copyright 2026 Flant JSC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Generate JSON report via ginkgo dry-run for precheck preparation +# This script suppresses output while preserving error reporting + +set -e + +# Build ginkgo command +CMD="go tool ginkgo --json-report=/tmp/e2e-specs.json --dry-run --no-color" + +# Run with suppressed stdout, but show stderr +$CMD 2>&1 > /dev/null + +echo "Precheck prepare completed" diff --git a/test/e2e/scripts/task_run_ci.sh b/test/e2e/scripts/task_run_ci.sh index 9873c723ba..33e05b0bdb 100755 --- a/test/e2e/scripts/task_run_ci.sh +++ b/test/e2e/scripts/task_run_ci.sh @@ -21,9 +21,10 @@ echo "DATE=$DATE" >> $GITHUB_ENV START_TIME=$(date +"%H:%M:%S") echo "START_TIME=$START_TIME" >> $GITHUB_ENV -go tool ginkgo \ - --focus="VirtualMachineAdditionalNetworkInterfaces" \ - -v --race --timeout=$TIMEOUT | tee $GINKGO_RESULT +go tool ginkgo -v \ + --race \ + --focus=$FOCUS \ + --timeout=$TIMEOUT | tee $GINKGO_RESULT EXIT_CODE="${PIPESTATUS[0]}" RESULT=$(sed -e "s/\x1b\[[0-9;]*m//g" $GINKGO_RESULT | grep --color=never -E "FAIL!|SUCCESS!") if [[ $RESULT == FAIL!* || $EXIT_CODE -ne "0" ]]; then From d2472766091651d23076c088925f560a8573a8dc Mon Sep 17 00:00:00 2001 From: Roman Sysoev <36233932+hardcoretime@users.noreply.github.com> Date: Wed, 29 Apr 2026 22:18:43 +0300 Subject: [PATCH 2/2] Update .github/workflows/e2e-reusable-pipeline.yml Co-authored-by: Nikita Korolev <141920865+universal-itengineer@users.noreply.github.com> Signed-off-by: Roman Sysoev <36233932+hardcoretime@users.noreply.github.com> --- .github/workflows/e2e-reusable-pipeline.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/e2e-reusable-pipeline.yml b/.github/workflows/e2e-reusable-pipeline.yml index f4839bce4d..55e1399eb9 100644 --- a/.github/workflows/e2e-reusable-pipeline.yml +++ b/.github/workflows/e2e-reusable-pipeline.yml @@ -1281,7 +1281,7 @@ jobs: cp -a legacy/testdata /tmp/testdata - ./test/e2e/scripts/precheck-prepare_ci.sh + ./scripts/precheck-prepare_ci.sh set +e FOCUS="${{ inputs.e2e_focus_tests }}"