From 579b7b9460f9309da91988fd07b6b7ed309489fb Mon Sep 17 00:00:00 2001 From: moilanik Date: Sat, 13 Jun 2026 06:54:21 +0300 Subject: [PATCH] =?UTF-8?q?korjattu=20cucumber=20toimimaan=20CI:ss=C3=A4:?= =?UTF-8?q?=20asenna=20lsof/jq,=20korjattu=20pkill=20itse-tappo?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .gitea/workflows/build-feature.yml | 1 + tests/features/step_definitions/test-execution.steps.js | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/.gitea/workflows/build-feature.yml b/.gitea/workflows/build-feature.yml index a6844af..5027b0b 100644 --- a/.gitea/workflows/build-feature.yml +++ b/.gitea/workflows/build-feature.yml @@ -90,6 +90,7 @@ jobs: id: prepare-cucumber shell: bash run: | + apt-get update -qq && apt-get install -y -qq --no-install-recommends lsof jq if npm install @cucumber/cucumber > /dev/null 2>&1 && \ npx --package @cucumber/cucumber cucumber-js --dry-run tests/features/ > /dev/null 2>&1; then echo "TOOL_OK=true" >> "${GITHUB_ENV}" diff --git a/tests/features/step_definitions/test-execution.steps.js b/tests/features/step_definitions/test-execution.steps.js index 19ec879..264a861 100644 --- a/tests/features/step_definitions/test-execution.steps.js +++ b/tests/features/step_definitions/test-execution.steps.js @@ -30,7 +30,7 @@ function envBlock() { } function setupMock(seqJson) { - execSync('pkill -9 -f mock-server 2>/dev/null || true', { stdio: 'ignore' }); + execSync('lsof -ti :18080 2>/dev/null | xargs -r kill -9 2>/dev/null || true', { stdio: 'ignore' }); execSync('sleep 0.4', { stdio: 'ignore' }); const seqFile = path.join(os.tmpdir(), `cucumber_seq_${Date.now()}.json`);