相关疑难解决方法(0)

Bitbucket pipeline 您的系统缺少依赖项:Xvfb

我正在尝试将 cypress 添加到 bitbucket 管道,但它告诉我需要安装 Xvfb,但我不知道如何继续。这是我的 bitbucket.pipelines.yml

#  Template NodeJS build

#  This template allows you to validate your NodeJS code.
#  The workflow allows running tests and code linting on the default branch.

image: node:14.15.4

pipelines:
  default:
    - step:
        name: Build
        script:
          - npm install
          - npm run lint
          - npm run cypress:run
Run Code Online (Sandbox Code Playgroud)

这是我的 package.json 脚本

"scripts": {
    "cypress:open": "cypress open",
    "cypress:run": "npx cypress run --record --key xxxxxxxxxxxx"
}
Run Code Online (Sandbox Code Playgroud)

并且测试在本地运行良好 在此输入图像描述

但在管道中我收到此错误:

+ npm run cypress:run
> wallet-frontend@0.1.0 cypress:run /opt/atlassian/pipelines/agent/build …
Run Code Online (Sandbox Code Playgroud)

testing bitbucket npm cypress

16
推荐指数
1
解决办法
2万
查看次数

标签 统计

bitbucket ×1

cypress ×1

npm ×1

testing ×1