赛普拉斯ci缺少libgtk-x11-2.0.so.0

时间:2019-02-20 21:17:08

标签: docker circleci cypress

我正在用ci圈运行Cypress。使用球体时可以使用,但不能。我试图同时启动两个客户端服务器和节点服务器。似乎我在docker容器中缺少包装或其他东西。

我愿意改回使用赛普拉斯球,但是我不确定如何设置它以使两个服务器在运行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

1 个答案:

答案 0 :(得分:1)

您实际上并没有在cypress/base:10码头工人镜像中执行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
相关问题