【问题标题】:how do I run/finish test stript in github action yml file?如何在 github action yml 文件中运行/完成测试条?
【发布时间】:2020-07-12 14:45:15
【问题描述】:

在我的反应应用程序中,我有脚本:

"test": "react-scripts test --env=jsdom",
"test:coverage": "yarn test --coverage --watchAll",

  // in my yml file:
  - name: Yarn install, Build and Test
    run: |
      yarn 
      yarn test:coverage
      yarn build

测试完成后如何退出手表模式?因为在 github 操作中,当它运行时它会无限期地挂在那里。

【问题讨论】:

  • 你应该从命令中删除--watchAll,或者在CI中使用不同的目标。

标签: reactjs github github-actions


【解决方案1】:

只需使用--watchAll 创建另一个用于本地使用的命令。示例:

"test": "react-scripts test --env=jsdom",
"test:coverage": "yarn test --coverage",
"test:coverage-watch": "yarn test:coverage --watchAll"

【讨论】:

    猜你喜欢
    • 2021-11-22
    • 2020-01-01
    • 2020-04-11
    • 2021-08-28
    • 1970-01-01
    • 1970-01-01
    • 2014-11-25
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多