您如何获得“反式脚本测试”与AWS Codepipeline合作?
我有一个使用Create React应用程序生成的React应用程序。我想在AWS Codepipeline启动之前确保测试通过。这是我的buildspec.yml
文件,没有npm test
命令正常工作。添加测试命令后,它将运行测试,我已经设置了要失败的测试,然后构建就挂起。
version: 0.2
phases:
install:
commands:
- cd react/menu && npm install
build:
commands:
- npm test
- npm run-script build
artifacts:
files: "**/*"
base-directory: "react/menu/build"
I have a React app that I generated using Create React App. I'd like to make sure the tests pass before the build starts in AWS CodePipeline. Here is my buildspec.yml
file which works just fine without the npm test
command. Once I add the test command, it runs the tests, which I have setup to fail, and then the build just hangs.
version: 0.2
phases:
install:
commands:
- cd react/menu && npm install
build:
commands:
- npm test
- npm run-script build
artifacts:
files: "**/*"
base-directory: "react/menu/build"
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
按照 @Haseeb-Anwar建议,我能够通过关闭手表模式来使其工作。
I was able to get it to work by turning off watch mode as @haseeb-anwar suggested.