【问题标题】:cypress command returns error in pipelinecypress 命令在管道中返回错误
【发布时间】: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


    【解决方案1】:

    搜索了一段时间后发现我使用的是导致问题的 cypress 8.7.0,我降级到 cypress 8.5.0 并开始工作,希望能帮助其他遇到此问题的人

    【讨论】:

    • 尽可能接受您自己的答案!
    猜你喜欢
    • 1970-01-01
    • 2018-03-13
    • 1970-01-01
    • 1970-01-01
    • 2017-06-23
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2016-10-21
    相关资源
    最近更新 更多