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`);