From 28344a43e1d5fd5b7d34f8b4ee000d23add1ac1f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=8E=E9=9F=BB=E6=99=9F?= Date: Tue, 22 Dec 2020 22:18:33 +0800 Subject: [PATCH] feat: add ci pipeline --- .circleci/config.yml | 40 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 40 insertions(+) create mode 100644 .circleci/config.yml diff --git a/.circleci/config.yml b/.circleci/config.yml new file mode 100644 index 0000000..b6c8b77 --- /dev/null +++ b/.circleci/config.yml @@ -0,0 +1,40 @@ +version: 2.1 + +orbs: + node: circleci/node@3.0.1 + +jobs: + build: + working_directory: ~/one-piece-gateway + executor: node/default + steps: + - checkout + - node/install-npm + - node/install-packages: + app-dir: ~/one-piece-gateway + cache-path: node_modules + override-ci-command: sudo npm i + - persist_to_workspace: + root: . + paths: + - . + + test: + docker: + - image: cimg/node:current + steps: + - attach_workspace: + at: . + - run: + # no test yet + name: Test + command: sudo npm run build + +workflows: + version: 2 + build_and_test: + jobs: + - build + - test: + requires: + - build \ No newline at end of file