Skip to content

Commit 2e62a98

Browse files
test(ci): add pre-check system to CI workflow (#2306)
Signed-off-by: Roman Sysoev <roman.sysoev@flant.com> Co-authored-by: Nikita Korolev <nikita.korolev@flant.com>
1 parent ce0b5e6 commit 2e62a98

4 files changed

Lines changed: 37 additions & 3 deletions

File tree

.github/workflows/e2e-reusable-pipeline.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1281,6 +1281,8 @@ jobs:
12811281
12821282
cp -a legacy/testdata /tmp/testdata
12831283
1284+
./scripts/precheck-prepare_ci.sh
1285+
12841286
set +e
12851287
FOCUS="${{ inputs.e2e_focus_tests }}"
12861288
if [ -n "$FOCUS" ]; then

test/e2e/Taskfile.yaml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,10 +34,13 @@ tasks:
3434
3535
run:ci:
3636
desc: "Separate task to run e2e tests in the CI environment"
37+
env:
38+
FOCUS: "VirtualMachineAdditionalNetworkInterfaces"
3739
deps:
3840
- copy
3941
- kubectl
4042
- d8
43+
- precheck:prepare
4144
cmds:
4245
- ./scripts/task_run_ci.sh
4346

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
#!/usr/bin/env bash
2+
3+
# Copyright 2026 Flant JSC
4+
#
5+
# Licensed under the Apache License, Version 2.0 (the "License");
6+
# you may not use this file except in compliance with the License.
7+
# You may obtain a copy of the License at
8+
#
9+
# http://www.apache.org/licenses/LICENSE-2.0
10+
#
11+
# Unless required by applicable law or agreed to in writing, software
12+
# distributed under the License is distributed on an "AS IS" BASIS,
13+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14+
# See the License for the specific language governing permissions and
15+
# limitations under the License.
16+
17+
# Generate JSON report via ginkgo dry-run for precheck preparation
18+
# This script suppresses output while preserving error reporting
19+
20+
set -e
21+
22+
# Build ginkgo command
23+
CMD="go tool ginkgo --json-report=/tmp/e2e-specs.json --dry-run --no-color"
24+
25+
# Run with suppressed stdout, but show stderr
26+
$CMD 2>&1 > /dev/null
27+
28+
echo "Precheck prepare completed"

test/e2e/scripts/task_run_ci.sh

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,9 +21,10 @@ echo "DATE=$DATE" >> $GITHUB_ENV
2121
START_TIME=$(date +"%H:%M:%S")
2222
echo "START_TIME=$START_TIME" >> $GITHUB_ENV
2323

24-
go tool ginkgo \
25-
--focus="VirtualMachineAdditionalNetworkInterfaces" \
26-
-v --race --timeout=$TIMEOUT | tee $GINKGO_RESULT
24+
go tool ginkgo -v \
25+
--race \
26+
--focus=$FOCUS \
27+
--timeout=$TIMEOUT | tee $GINKGO_RESULT
2728
EXIT_CODE="${PIPESTATUS[0]}"
2829
RESULT=$(sed -e "s/\x1b\[[0-9;]*m//g" $GINKGO_RESULT | grep --color=never -E "FAIL!|SUCCESS!")
2930
if [[ $RESULT == FAIL!* || $EXIT_CODE -ne "0" ]]; then

0 commit comments

Comments
 (0)