【问题标题】:How to setup github actions to run headful puppeteer for E2E extension testing如何设置 github 操作以运行 headful puppeteer 以进行 E2E 扩展测试
【发布时间】:2019-09-11 12:51:25
【问题描述】:

任何帮助将不胜感激!

如果测试失败,我要求不允许我的 github 用户合并到 master。 github 中的合并按钮应该被禁用,并且应该显示测试详细信息。

我决定使用 github 操作来实现这些要求。

我的问题是: 如何设置 github 操作工作流,安装 XVFB 以使用 puppeteer 运行 HEADFUL E2E 测试以测试扩展?

我会在 windows(xvfb?)、mac、ubuntu 上运行测试。

还可以在我的 Digital Ocean 服务器而不是 github 的容器上运行测试吗?我已经在这里设置了所有内容,并且可以正常工作!

最后,我无法替换 1.傀儡师 2.节点 3. Github 动作 与其他一些库/工具。

【问题讨论】:

标签: github continuous-integration puppeteer build-automation github-actions


【解决方案1】:

您可以在自己的服务器上运行测试,但要这样做,您可能必须在两者之间创建链接(例如,GHA 调用您的服务器,然后显示其输出)。

目前,通过 Puppeteer 使用动作(如 Puppeteer Headful)或使用必要工具创建 docker 映像可能更容易。

# This is an example configuration, you'll still need to create your own DockerFile
on: push
jobs:
  test:
    runs-on: ubuntu-latest
    container: your-image-with-puppeteer-and-xvfb
    steps:
    - uses: actions/checkout@v1
    - run: npm install
    - run: npm test

【讨论】:

    猜你喜欢
    • 2021-10-26
    • 2020-09-24
    • 2020-11-10
    • 1970-01-01
    • 2020-01-15
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2021-06-30
    相关资源
    最近更新 更多