【发布时间】: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
【问题讨论】: