From 7ab76e3a91de6aba53a36e4fd8934ffeb35f7703 Mon Sep 17 00:00:00 2001 From: Kunal Nagar Date: Sat, 13 Mar 2021 17:31:01 -0500 Subject: [PATCH] chore: Add CI using CircleCI [IS-2] (#41) --- .circleci/config.yml | 35 +++++++++++++++++++++++++++++++++++ package.json | 1 + 2 files changed, 36 insertions(+) create mode 100644 .circleci/config.yml diff --git a/.circleci/config.yml b/.circleci/config.yml new file mode 100644 index 0000000..ceaaddb --- /dev/null +++ b/.circleci/config.yml @@ -0,0 +1,35 @@ +version: 2.1 + +commands: + setup: + steps: + - checkout + - run: + name: 'Login to npm' + command: echo "//registry.npmjs.org/:_authToken=$NPM_TOKEN" >> ~/.npmrc + - run: yarn install --frozen-lockfile + +executors: + node: + docker: + - image: circleci/node:14.16.0 + +jobs: + lint-build: + executor: node + steps: + - setup + - run: + name: Lint source code + command: yarn lint + - run: + name: Build distribution files + command: yarn build + - persist_to_workspace: + root: . + paths: . + +workflows: + test-and-publish: + jobs: + - lint-build diff --git a/package.json b/package.json index d0ad210..d373711 100644 --- a/package.json +++ b/package.json @@ -14,6 +14,7 @@ "scripts": { "lint": "eslint --fix src/ tests/ --ext .js,.ts,.tsx --max-warnings 0", "start": "tsc && node dist/index.js", + "build": "tsc", "test": "ts-mocha -p tsconfig.json tests/**/*.spec.ts -t 150000" }, "husky": {