Tag: travis ci

`react-scripts test`返回码总是为零

有没有人知道如何在yarn test失败时在react应用程序中返回非零代码的yarn test (或npm test ) 在我的项目中,执行CI=true yarn test返回 Test Suites: 10 failed, 10 total Tests: 1 failed, 1 total Snapshots: 0 total Time: 1.736s Ran all test suites. Done in 2.34s. 所有testing失败。 但是这个命令返回了零码。 这使得travis-ci无法检测到失败的testing

Travis-CI节点随机构build失败

我有一个节点模块的问题,其中所有的testing在本地,在其他盒子上和Travis-CI上工作,但有时候,而不是由于超时, Travis-CI上的一个testing失败。 testing是确定性的,至less根据我的说法,所以它不应该随机失败。 我已经将问题追溯到这个部分: function record(rec_options) { // Originaly the parameter was a dont_print boolean flag. // To keep the existing code compatible we take that case into account. var typeof_rec_options = typeof(rec_options); var dont_print = (typeof_rec_options === 'boolean' && rec_options) || (typeof_rec_options === 'object' && rec_options.dont_print); var output_objects = typeof_rec_options === 'object' && rec_options.output_objects; […]

在travis上运行child_process.exec失败,而不是在本地运行

我正在travis上运行一个命令来计算从我当前testing的分支的主分支点(保证不是主)。 运行这个命令: function execute(cmd, cb) { exec(cmd, function (err, stdout, stderr) { if(err) { console.error('err', err); } if(stderr) { console.error('err', err); } cb(stdout.split('\n').join('')); }); } execute('git rev-parse –short HEAD', cb) 运行,并返回我目前的分支短的特拉维斯很好。 当我跑步 var command = "bash -c 'diff -u <(git rev-list –all bf2a1b7b7cf97f5df0618830f63d535db1a5dca6) "+ "<(git rev-list –first-parent master)' "+ "| sed -ne 's/^ //p' | […]

如何testingtravis上的构build脚本更改,而无需检查每个更改的代码

我有一个与我的node.js项目travis生成问题。 这个问题来自于我想要运行一个相当复杂的testing,这个testing需要在虚拟机上创build和运行一些testing脚手架框架,然后才能进行“npmtesting”。 在这个行的某处失败了,我发现自己在我的.travis.yml文件中join了debugging语句来试图解决这个问题,但是令人讨厌的是我的提交历史logging充满了这些改变/尝试的修复。 我想我可以(a)在testing运行的时候(或者之后)能够(a)在travis框上,这样我就可以检查到底是怎么回事,或者(b)至less能够调整并以某种方式运行我的.travis.yml文件和相关脚本,并立即重新运行,而不必正式检查这些更改以便再次启动travis。

安装更新版本的mongodb for Travis-ci

在travis上运行testing时,当前的默认版本是2.4.12,在运行我的testing之前需要更改。 有什么办法从我的Travis文件configuration这个?

在成功的Travis构build/testing之后,如何将node.js应用程序部署到私有服务器?

这是我想要为我的node.js应用程序的pipe道: 在开发机器上写代码 – > commit to github – > Travis的构build和testing – >成功时:部署到私有服务器 我正在寻找工具来完成最后一部分。 例如,一些工具,将通过特拉维斯通知,并将代码从github到我的私人服务器(并以这种方式部署应用程序)。

无法在Travis CI上运行凉亭

我已经几乎尝试了所有可能的事情,但是我无法在Travis CI上运行构build,因为它在构造上出错。 我知道这个问题可能听起来像一个重复的,但我已经尝试了通常的修复,似乎是为其他人工作,但不是为我:) 一个例子: https : //stackoverflow.com/a/29064091/1749585 我的存储库是https://github.com/myTerminal/faded-multiselect ,你可以在Travis CI上findhttps://travis-ci.org/myTerminal/faded-multiselect

为什么Travis CI会报告构build成功,即使npm发布失败?

我注意到生成https://travis-ci.org/neverendingqs/openssl-self-signed-certificate/builds/187723295 ,我忘了增加补丁版本时,标记回购。 但是,即使由于版本已经存在导致npm发布失败,构build报告也会通过。 这里是日志的尾部: Deploying application NPM API key format changed recently. If your deployment fails, check your API key in ~/.npmrc. http://docs.travis-ci.com/user/deployment/npm/ ~/.npmrc size: 48 npm ERR! publish Failed PUT 403 npm ERR! Linux 4.8.12-040812-generic npm ERR! argv "/home/travis/.nvm/v0.10.48/bin/node" "/home/travis/.nvm/v0.10.48/bin/npm" "publish" npm ERR! node v0.10.48 npm ERR! npm v2.15.1 npm ERR! code E403 npm […]

节点应用程序没有运行在我的电脑上,但运行良好与我的团队的其他电脑(使用Git)

我们的团队使用Node.js服务器创build一个项目,并使用Gi​​tHub作为源代码控制。 问题是当我将运行服务器。 我使用下一步来testing主服务器是否会启动应用程序。 git checkout master git pull npm update node .\backend\server.js 最后的评论给我下一个错误。 D:\***\node_modules\passport-oauth2\lib\strategy.js:82 if (!options.clientID) { throw new TypeError('OAuth2Strategy requires a clientID option'); } ^ TypeError: OAuth2Strategy requires a clientID option at Strategy.OAuth2Strategy (D:\Documenten\WatchFriends\Web\node_modules\passport-oauth2\lib\strategy.js:82:34) at new Strategy (D:\Documenten\WatchFriends\Web\node_modules\passport-google-oauth20\lib\strategy.js:52:18) at module.exports.config (D:\Documenten\WatchFriends\Web\backend\data\passport.js:94:18) at Object.<anonymous> (D:\Documenten\WatchFriends\Web\backend\server.js:16:1) at Module._compile (module.js:570:32) at Object.Module._extensions..js (module.js:579:10) at Module.load (module.js:487:32) at […]

在Travis的后台运行节点服务器

我试图对travis进行unit testing,它需要一个位于单独目录中的节点服务器来运行。 所以我需要在运行chai-mochatesting之前让服务器在后台运行。 但是我一直有很多麻烦得到这一切工作…这里是我的.yml文件 language: node_js node_js: – "6.10.0" services: mongodb env: – TEST_DIR=UserService/server – TEST_DIR=ApplicantService – TEST_DIR=ta-corrd-service before_script: – sleep 15 script: – cd UserService/server && npm install nodemon && npm install && npm start& cd $TEST_DIR && npm install && npm test 我需要进入userservice / server目录,然后执行npm start,然后在每个test_dir中执行npmtesting。 错误我得到特拉维斯 > proj-awol@0.0.0 test /home/travis/build/csc302-2017-spring/proj-Awol/ta-corrd-service > mocha […]