diff --git a/.circleci/config.yml b/.circleci/config.yml index e4c8b97..a22dfba 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -1,26 +1,34 @@ version: 2.1 +workflows: + build_and_test: + jobs: + - build + - test: + requires: + - build jobs: build: - docker: - - image: cimg/node:14.10.1 + docker: + - image: cimg/node:14.10.1 # the primary container, where your job's commands are run steps: - - checkout + - checkout # check out the code in the project directory - restore_cache: key: yarn-packages-{{ checksum "yarn.lock" }} - run: yarn global add node-gyp && yarn install - save_cache: - key: yarn-packages-{{ checksum "yarn.lock" }} - paths: - - ~/.cache/yarn - check_format: - steps: + key: yarn-packages-{{ checksum "yarn.lock" }} + paths: + - ./node_modules + test: + docker: + - image: cimg/node:14.10.1 # the primary container, where your job's commands are run + steps: - checkout - - run : yarn lint && yarn format:check - -workflows: - build_and_test: - jobs: - - build - - check_format: - requires: - - build \ No newline at end of file + - restore_cache: + key: yarn-packages-{{ checksum "yarn.lock" }} + - run: yarn lint && yarn format:check + - run: yarn test:ci + - save_cache: + key: yarn-packages-{{ checksum "yarn.lock" }} + paths: + - ./node_modules \ No newline at end of file