korjattu cucumber toimimaan CI:ssä: asenna lsof/jq, korjattu pkill itse-tappo
ci-bats Bats tests FAILED
ci-cucumber Cucumber tests passed
CI / feature (push) Failing after 1m15s
CI / main (push) Has been skipped

This commit is contained in:
moilanik
2026-06-13 06:54:21 +03:00
parent bc25fdb21f
commit 579b7b9460
2 changed files with 2 additions and 1 deletions
+1
View File
@@ -90,6 +90,7 @@ jobs:
id: prepare-cucumber id: prepare-cucumber
shell: bash shell: bash
run: | run: |
apt-get update -qq && apt-get install -y -qq --no-install-recommends lsof jq
if npm install @cucumber/cucumber > /dev/null 2>&1 && \ if npm install @cucumber/cucumber > /dev/null 2>&1 && \
npx --package @cucumber/cucumber cucumber-js --dry-run tests/features/ > /dev/null 2>&1; then npx --package @cucumber/cucumber cucumber-js --dry-run tests/features/ > /dev/null 2>&1; then
echo "TOOL_OK=true" >> "${GITHUB_ENV}" echo "TOOL_OK=true" >> "${GITHUB_ENV}"
@@ -30,7 +30,7 @@ function envBlock() {
} }
function setupMock(seqJson) { 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' }); execSync('sleep 0.4', { stdio: 'ignore' });
const seqFile = path.join(os.tmpdir(), `cucumber_seq_${Date.now()}.json`); const seqFile = path.join(os.tmpdir(), `cucumber_seq_${Date.now()}.json`);