Created
February 5, 2019 20:58
-
-
Save nichoth/3f02c372cf1dd63fd9b5c2db256d2131 to your computer and use it in GitHub Desktop.
Use xvbf with tape-run on circleci
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Javascript Node CircleCI 2.0 configuration file | |
# | |
# Check https://circleci.com/docs/2.0/language-javascript/ for more details | |
# | |
version: 2 | |
jobs: | |
build: | |
docker: | |
# specify the version you desire here | |
- image: cypress/browsers:chrome67 | |
# Specify service dependencies here if necessary | |
# CircleCI maintains a library of pre-built images | |
# documented at https://circleci.com/docs/2.0/circleci-images/ | |
# - image: circleci/mongo:3.4.4 | |
working_directory: ~/repo | |
steps: | |
- checkout | |
# Download and cache dependencies | |
- restore_cache: | |
keys: | |
- v1-dependencies-{{ checksum "package.json" }} | |
# # fallback to using the latest cache if no exact match is found | |
# - v1-dependencies- | |
- run: | |
name: Install dependencies | |
command: npm ci | |
- run: npm run cy:verify | |
- save_cache: | |
paths: | |
- ~/.npm | |
- ~/.cache | |
key: v1-dependencies-{{ checksum "package.json" }} | |
- run: | |
name: Start Xvfb | |
command: Xvfb -ac :99 -screen 0 1024x768x24 > /dev/null 2>&1 | |
background: true | |
# run tests! | |
- run: | |
name: Unit tests | |
command: npm test | |
- run: | |
name: Browser unit tests | |
command: export DISPLAY=:99 && npm run test-browser | |
- run: | |
name: Cypress tests | |
command: npm run cypress-ci | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment