Skip to content

Instantly share code, notes, and snippets.

@thescientist13
Created October 14, 2017 04:35
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save thescientist13/61c52ea089fde377e3819b21b1b50540 to your computer and use it in GitHub Desktop.
Save thescientist13/61c52ea089fde377e3819b21b1b50540 to your computer and use it in GitHub Desktop.
CircleCI config.yml before custom Docker image
version: 2
jobs:
build:
docker:
- image: circleci/node:6.11.0
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-
# https://github.com/Quramy/puppeteer-example#with-docker-based-ci-services
- run:
name: Install Host Packages
command: sudo apt-get update && sudo apt-get install -yq gconf-service libasound2 libatk1.0-0 libc6 libcairo2 libcups2 libdbus-1-3
libexpat1 libfontconfig1 libgcc1 libgconf-2-4 libgdk-pixbuf2.0-0 libglib2.0-0 libgtk-3-0 libnspr4
libpango-1.0-0 libpangocairo-1.0-0 libstdc++6 libx11-6 libx11-xcb1 libxcb1 libxcomposite1
libxcursor1 libxdamage1 libxext6 libxfixes3 libxi6 libxrandr2 libxrender1 libxss1 libxtst6
ca-certificates fonts-liberation libappindicator1 libnss3 lsb-release xdg-utils wget lxc -y
- run:
name: Environment
command: node --version
- run:
name: Install Yarn
command: sudo npm install -g yarn@~1.0.0
- run:
name: Install Dependencies
command: yarn install
- run:
name: Run Unit Tests
command: export NODE_ENV=production && yarn run test
- run:
name: Run the Build
command: yarn run build
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment