From a9245d3111b312a326509069214783cff87179c7 Mon Sep 17 00:00:00 2001 From: Rishikesh Darandale Date: Fri, 25 Jan 2019 12:15:05 +0530 Subject: [PATCH] feat(compliance): added the circle ci configuration --- .circleci/config.yml | 54 ++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 54 insertions(+) create mode 100644 .circleci/config.yml diff --git a/.circleci/config.yml b/.circleci/config.yml new file mode 100644 index 0000000..fbf8e23 --- /dev/null +++ b/.circleci/config.yml @@ -0,0 +1,54 @@ +# Javascript Node CircleCI 2.0 configuration file +# +# Check https://circleci.com/docs/2.0/language-javascript/ for more details +# +version: 2 + +defaults: &defaults + working_directory: ~/repo + docker: + - image: circleci/node:10.9.0 + +jobs: + test: + <<: *defaults + steps: + - checkout + - run: npm ci + - run: + name: Do dependency audit + command: npm audit + - run: + name: Run tests + command: npm test + - persist_to_workspace: + root: ~/repo + paths: . + deploy: + <<: *defaults + steps: + - attach_workspace: + at: ~/repo + - run: + name: Authenticate with registry + command: echo "//registry.npmjs.org/:_authToken=$npm_TOKEN" > ~/repo/.npmrc + - run: + name: Publish package + command: npm publish + +workflows: + version: 2 + test-deploy: + jobs: + - test: + filters: + tags: + only: /^v.*/ + - deploy: + requires: + - test + filters: + tags: + only: /^v.*/ + branches: + ignore: /.*/