【问题标题】:Meteor + CodeShip + ModulusMeteor + CodeShip + Modulus
【发布时间】:2015-05-15 13:42:25
【问题描述】:

谁能推荐一个好的设置脚本在通过测试后部署到 Modulus?

我现在正在使用:

nvm install 0.10.28
nvm use 0.10.28
curl -o meteor_install_script.sh https://install.meteor.com/
chmod +x meteor_install_script.sh
sed -i "s/type sudo >\/dev\/null 2>&1/\ false /g" meteor_install_script.sh
./meteor_install_script.sh
export PATH=$PATH:~/.meteor/
meteor --version

这基本上是我设法在 interwebz 上复制和粘贴的内容,但我不知道自己在做什么。

最后我的测试管道是:

meteor --test

CodeShip 日志的输出:

I20150515-13:34:16.005(0)? [velocity] mocha is starting a mirror at http://localhost:44995/.
I20150515-13:34:16.006(0)? [velocity] This takes a few minutes the first time.
I20150515-13:34:16.006(0)? [velocity] You can see the mirror logs at: tail -f /home/rof/src/bitbucket.org/atlasshrugs/garden/.meteor/local/log/mocha.log
PASSED mocha : Server initialization => should have a Meteor version defined

一旦进入客户端测试,它就会永远挂起并且无法构建。

有什么建议吗?

【问题讨论】:

  • 您能否让我们更好地了解您希望您的工作流程究竟是什么?看起来你正在安装 Meteor,然后运行测试......就是这样。
  • 这就是我正在做的,因为我正在尝试自学。我不知道我在做什么!我认为我的目标是每次推送到我的 Bitbucket 时,我都希望 Codeship 运行测试,如果测试通过,之后再部署到 Modulus。
  • 老实说,这是一个伟大的目标!所以摩卡咖啡正在完成。您使用什么进行客户端测试?
  • 谢谢!我也在使用 Mocha 进行客户端测试。我也注意到一条错误消息:流错误网络错误:ws://localhost:3000/websocket:连接 ECONNREFUSE。这里必须有一个连接,客户端测试永远挂起并且构建失败。我尝试按照stackoverflow.com/questions/26866008/… 的建议添加浏览器策略(并将该代码块添加到 Meteor.startup),但到目前为止还没有。
  • 我不想说这是不可能的 :) 也许来自 codeship 的人会提供帮助。看来您也可以在推特上@codeship 并询问有关 mocha 浏览器测试的问题。

标签: meteor codeship modulus.io


【解决方案1】:

根据Velocity readme,你应该使用这个命令:meteor --test --release velocity:METEOR@1.1.0.3_1。我确实设法使用以下设置命令使其工作:

nvm install 0.10.30
nvm use 0.10.30
curl -o meteor_install_script.sh https://install.meteor.com/
chmod +x meteor_install_script.sh
sed -i "s/type sudo >\/dev\/null 2>&1/\ false 
/g"meteor_install_script.sh
./meteor_install_script.sh
export PATH=$PATH:~/.meteor/
meteor --version

还有这个测试命令(用 Meteor 应用程序目录的路径替换。在这种情况下sanjo:jasmine 是必需的,但如果您使用其他测试器,则可能需要添加相关包。velocity:html-reporter 包是为此目的矫枉过正,但它确实有效,控制台报告器应该足够了,但我没有测试它):

cd ~/src/bitbucket.org/<path>/ && 
meteor add sanjo:jasmine velocity:html-reporter && 
meteor --test --release velocity:METEOR@1.1.0.3_1

【讨论】:

  • 我也看到了这个更新。他们是时候发布 CI 修复程序了!
猜你喜欢
  • 2015-03-04
  • 1970-01-01
  • 2015-02-06
  • 1970-01-01
  • 1970-01-01
  • 2014-10-06
  • 1970-01-01
  • 1970-01-01
  • 2016-04-05
相关资源
最近更新 更多