From ee3d1c42d686d522fc0dd177b5a8dd99369f19b9 Mon Sep 17 00:00:00 2001 From: idleberg Date: Fri, 22 Jan 2021 17:51:16 +0100 Subject: [PATCH] update CircleCI config --- .circleci/config.yml | 38 +++++++++++++++++++++++++++----------- 1 file changed, 27 insertions(+), 11 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 4a799dc..e66e60f 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -1,22 +1,38 @@ -version: 2 -jobs: - build: - working_directory: ~/repo - docker: - - image: circleci/node:latest +version: 2.1 + +commands: + run-test: steps: - checkout - restore_cache: - name: Restore npm Package Data Cache key: dependency-cache-{{ checksum "package.json" }} - run: - name: Install Node dependencies + name: Installing Dependencies command: npm ci - save_cache: - name: Cache npm Package Data key: dependency-cache-{{ checksum "package.json" }} paths: - ./node_modules - run: - name: Run Tests - command: npm run test + name: Running Tests + command: npm test + +jobs: + node-latest: + docker: + - image: circleci/node:latest + steps: + - run-test + + node-lts: + docker: + - image: circleci/node:lts + steps: + - run-test + +workflows: + node-run-tests: + jobs: + - node-latest + - node-lts + version: 2