From 7c2babcbda435594599c18bc03372e2020a9c192 Mon Sep 17 00:00:00 2001 From: Carlin Isaacson Date: Thu, 13 Dec 2018 13:14:04 -0800 Subject: [PATCH] Add CircleCI config --- .circleci/config.yml | 55 ++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 55 insertions(+) create mode 100644 .circleci/config.yml diff --git a/.circleci/config.yml b/.circleci/config.yml new file mode 100644 index 0000000..710fa9d --- /dev/null +++ b/.circleci/config.yml @@ -0,0 +1,55 @@ +# Javascript Node CircleCI 2.0 configuration file +# +# Check https://circleci.com/docs/2.0/language-javascript/ for more details +# + +defaults: &defaults + docker: + # Choose the version of Node you want here + - image: circleci/node:10.11 + working_directory: ~/repo + +version: 2 +jobs: + setup: + <<: *defaults + steps: + - checkout + - restore_cache: + name: Restore node modules + 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: yarn install + - save_cache: + name: Save node modules + paths: + - node_modules + key: v1-dependencies-{{ checksum "package.json" }} + + + tests: + <<: *defaults + steps: + - checkout + - restore_cache: + name: Restore node modules + keys: + - v1-dependencies-{{ checksum "package.json" }} + # fallback to using the latest cache if no exact match is found + - v1-dependencies- + - run: + name: Run tests + command: yarn test + +workflows: + version: 2 + test_and_release: + jobs: + - setup + - tests: + requires: + - setup \ No newline at end of file