【发布时间】:2022-01-27 18:09:23
【问题描述】:
我有一个使用 github Action/workflow 的 CI 设置,每次在 repo 上完成合并时运行 cypress 自动化测试。安装步骤很好,但是我在执行 cypress 命令时遇到了问题,让我给你看代码。
.github/workflows 中的 CI 管道
name: Nuxt CI Pipeline
on:
push:
branches: [ CI-pipeline ]
# pull_request:
# branches: [ master ]
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [ 14.x ]
# See supported Node.js release schedule at https://nodejs.org/en/about/releases/
steps:
- uses: actions/checkout@v2
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v2
with:
node-version: ${{ matrix.node-version }}
cache: 'npm'
- name: Make envfile
uses: SpicyPizza/create-envfile@v1
with:
envkey_ENV: staging
file_name: .env
- run: npm ci
- run: |
cd e2e
ls -l
npm ci
npx cypress run
一切正常,直到最后一个命令 npx cypress run 出现错误
Failed to connect to the bus: Could not parse server address: Unknown address type (examples of valid types are "tcp" and on UNIX "unix")
同样的命令在本地也能正常工作。我不是 devops 人,所以我的信息非常有限,有人能指出正确的方向吗?
【问题讨论】:
标签: continuous-integration nuxt.js devops cypress github-actions