我正在尝试将 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)