Travis терпит неудачу, когда Cypress тесты заканчиваются успешно (запускаются с webpack-dev-server)
Я использую start-server-and-test
помощник (как предложено в документации Cypress), который терпит неудачу при попытке уничтожить один из его дочерних процессов, который, кажется, уже остановлен. Неопределенная гипотеза: потому что webpack-dev-server остановился сам?
Обычно это терпит неудачу, но не всегда:
(Tests Finished)
- Tests: 40
- Passes: 36
- Failures: 0
- Pending: 4
- Duration: 33 seconds
- Screenshots: 0
- Video Recorded: false
- Cypress Version: 2.1.0
(All Done)
start-server-and-test getting child processes +44s
start-server-and-test stopping child processes +8ms
{ Error: kill ESRCH
at exports._errnoException (util.js:1050:11)
at process.kill (internal/process.js:188:13)
at children.forEach.child (/home/travis/build/spt-marketplace/trust-web-sdk/node_modules/start-server-and-test/src/index.js:32:21)
at Array.forEach (native)
at Promise.fromNode.then.children (/home/travis/build/spt-marketplace/trust-web-sdk/node_modules/start-server-and-test/src/index.js:31:20)
at tryCatcher (/home/travis/build/spt-marketplace/trust-web-sdk/node_modules/start-server-and-test/node_modules/bluebird/js/release/util.js:16:23)
at Promise._settlePromiseFromHandler (/home/travis/build/spt-marketplace/trust-web-sdk/node_modules/start-server-and-test/node_modules/bluebird/js/release/promise.js:512:31)
at Promise._settlePromise (/home/travis/build/spt-marketplace/trust-web-sdk/node_modules/start-server-and-test/node_modules/bluebird/js/release/promise.js:569:18)
at Promise._settlePromise0 (/home/travis/build/spt-marketplace/trust-web-sdk/node_modules/start-server-and-test/node_modules/bluebird/js/release/promise.js:614:10)
at Promise._settlePromises (/home/travis/build/spt-marketplace/trust-web-sdk/node_modules/start-server-and-test/node_modules/bluebird/js/release/promise.js:693:18)
at Promise._fulfill (/home/travis/build/spt-marketplace/trust-web-sdk/node_modules/start-server-and-test/node_modules/bluebird/js/release/promise.js:638:18)
at /home/travis/build/spt-marketplace/trust-web-sdk/node_modules/start-server-and-test/node_modules/bluebird/js/release/nodeback.js:42:21
at /home/travis/build/spt-marketplace/trust-web-sdk/node_modules/ps-tree/index.js:86:7
at Stream.a.end (/home/travis/build/spt-marketplace/trust-web-sdk/node_modules/event-stream/index.js:87:5)
at Stream.onend (internal/streams/legacy.js:44:10)
at emitNone (events.js:91:20) code: 'ESRCH', errno: 'ESRCH', syscall: 'kill' }
npm ERR! Linux 4.4.0-116-generic
npm ERR! argv "/home/travis/.nvm/versions/node/v7.10.1/bin/node" "/home/travis/.nvm/versions/node/v7.10.1/bin/npm" "run" "test:functional"
npm ERR! node v7.10.1
npm ERR! npm v4.2.0
npm ERR! code ELIFECYCLE
npm ERR! 5merrno 1
npm ERR! @trust/trust-web-sdk@1.4.0 test:functional: `DEBUG=start-server-and-test start-server-and-test start:demo:default http://localhost:9000 cypress:run`
npm ERR! Exit status 1
Мой сценарий NPM:
{
"scripts": {
"start-and-test": "start-server-and-test webpack-dev-server --progress http-get://localhost:9000 cypress run"
}
}
РЕДАКТИРОВАТЬ:
Не понял, что вызывает это, но придумал этот обходной путь:
{
"scripts": {
"start": "webpack-dev-server --progress",
"run-test": "wait-on http://localhost:9000 && cypress run",
"start-and-test": "npm-run-all -p -r start run-test"
}
}
Покидать start-server-and-test
, Имейте пару успешных сборок с этим. Обновлю вопрос, если возникнут какие-либо проблемы.