From 08733bc56c758fc402e638c0273fb0441ccfe2b8 Mon Sep 17 00:00:00 2001 From: Jaewook Ahn Date: Sat, 7 May 2022 17:46:42 +0900 Subject: [PATCH] Update circleci config - use orb and auto caching feature --- .circleci/config.yml | 46 ++++++++++++++++++++++---------------------- .editorconfig | 3 +++ 2 files changed, 26 insertions(+), 23 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 5bfbaea..855df35 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -1,49 +1,49 @@ version: 2.1 + +orbs: + node: circleci/node@5.0.2 + jobs: prepare: - working_directory: ~/app - docker: - - image: 'circleci/node:latest' + executor: node/default steps: - checkout - - restore_cache: - key: dependency-cache-{{ checksum "yarn.lock" }} - - run: yarn install --frozen-lockfile - - save_cache: - key: dependency-cache-{{ checksum "yarn.lock" }} - paths: - - node_modules + - node/install-packages: + pkg-manager: yarn - persist_to_workspace: - root: ~/app + root: ~/project paths: - node_modules + build: - working_directory: ~/app - docker: - - image: 'circleci/node:latest' + executor: node/default steps: - checkout - attach_workspace: - at: ~/app + at: ~/project - run: yarn build + - persist_to_workspace: + root: ~/project + paths: + - node_modules + - build + lint: - working_directory: ~/app - docker: - - image: 'circleci/node:latest' + executor: node/default steps: - checkout - attach_workspace: - at: ~/app + at: ~/project - run: yarn lint + package: - working_directory: ~/app - docker: - - image: 'circleci/node:latest' + executor: node/default steps: - checkout - attach_workspace: - at: ~/app + at: ~/project - run: yarn package + workflows: version: 2 build-test: diff --git a/.editorconfig b/.editorconfig index 3e8c158..cc42c58 100644 --- a/.editorconfig +++ b/.editorconfig @@ -13,3 +13,6 @@ tab_width = 2 [*.md] trim_trailing_whitespace = false insert_final_newline = false + +[*.yml] +indent_size = 2