【问题标题】:cypress ci missing libgtk-x11-2.0.so.0赛普拉斯 ci 缺少 libgtk-x11-2.0.so.0
【发布时间】:2019-02-20 21:17:08
【问题描述】:

我正在用圆圈 ci 运行 Cypress。它在使用球体时有效,但这不起作用。我正在尝试同时启动我的客户端服务器和节点服务器。好像我在 docker 容器中缺少一个包或其他东西。

我愿意改回使用 cypress orb,但我不确定如何设置它以在运行之前让两台服务器都运行cypress/run

> If you are using Docker, we provide containers with all required dependencies installed.
----------

/home/circleci/.cache/Cypress/3.1.5/Cypress/Cypress: error while loading shared libraries: libgtk-x11-2.0.so.0: cannot open shared object file: No such file or directory
----------

Platform: linux (Debian - 8.11)
Cypress Version: 3.1.5

步骤如下:

docker:
      # specify the version you desire here
      - image: circleci/node:10.8.0
      - image: circleci/postgres:9.6
        environment:
          POSTGRES_USER: postgres
          POSTGRES_DB: dnb
      - image: redis
      - image: cypress/base:10
        environment:
          TERM: xterm
steps:
      - checkout

      - restore_cache:
          keys:
            - v1-deps-{{ .Branch }}-{{ checksum "package.json" }}
            - v1-deps-{{ .Branch }}
            - v1-deps

      - run:
          name: Install Dependencies
          command: npm install

      - save_cache:
          key: v1-deps-{{ .Branch }}-{{ checksum "package.json" }}
          # cache NPM modules and the folder with the Cypress binary
          paths:
            - ~/.npm
            - ~/.cache

      # - run:
      #     name: Run test
      #     command: npm test -- --coverage --forceExit --detectOpenHandles --maxWorkers=10
      #     no_output_timeout: 3m

      # - run:
      #     name: Send codecov coverage report
      #     command: bash <(curl -s https://codecov.io/bash) -f coverage/lcov.info -t

      - run:
          name: run client server
          command: npm start
          background: true

      - run:
          name: Pull server
          command: cd && git clone ....git && ls

      - run:
          name: run node server
          command: cd && cd ..i && npm install && npm run dev:prepare && npm start
          background: true

      - run: npm run cypress:run

【问题讨论】:

    标签: docker circleci cypress


    【解决方案1】:

    您实际上并没有在 cypress/base:10 docker 映像中执行 cypress。

    CircleCI docs for multiple images

    在多映像配置作业中,所有步骤都在列出的第一个映像创建的容器中执行。

    你应该试试这个:

    docker:
      # specify the version you desire here
          - image: cypress/base:10
            environment:
              TERM: xterm
          - image: circleci/postgres:9.6
            environment:
              POSTGRES_USER: postgres
              POSTGRES_DB: dnb
          - image: redis
    

    【讨论】:

      猜你喜欢
      • 2016-12-20
      • 1970-01-01
      • 2021-12-02
      • 2020-12-23
      • 2022-08-18
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多