From c2c66a68d6a3ccc8de2012ec4c2d3d49594e2700 Mon Sep 17 00:00:00 2001
From: Christopher Willis-Ford <7019101+cwillisf@users.noreply.github.com>
Date: Thu, 2 Jun 2022 11:00:14 -0700
Subject: [PATCH] ci: add initial CircleCI config

This doesn't yet handle hotfixes or cron jobs
---
 .circleci/config.yml | 37 +++++++++++++++++++++++++++++++++++++
 package.json         |  2 +-
 2 files changed, 38 insertions(+), 1 deletion(-)
 create mode 100644 .circleci/config.yml

diff --git a/.circleci/config.yml b/.circleci/config.yml
new file mode 100644
index 000000000..31af053a1
--- /dev/null
+++ b/.circleci/config.yml
@@ -0,0 +1,37 @@
+version: 2.1
+orbs:
+  node: circleci/node@5
+jobs:
+  branch-job:
+    executor: node/default # defaults to LTS
+    steps:
+    - checkout
+    - node/install-packages
+    - run: npm test
+    - run: npx commitlint --from=`git merge-base HEAD develop`
+    - run: npm run build
+  release-job:
+    executor: node/default # defaults to LTS
+    steps:
+    - checkout
+    - node/install-packages
+    - run: npm test
+    - run: npx commitlint --from='HEAD~1'
+    - run: npm run build
+    - run: npx semantic-release
+workflows:
+  version: 2
+  branch-workflow:
+    jobs:
+      - branch-job:
+          filters:
+            branches:
+              ignore:
+                - develop
+  release-workflow:
+    jobs:
+      - release-job:
+          filters:
+            branches:
+              only:
+                - develop
diff --git a/package.json b/package.json
index e495de0d1..6ca4a980f 100644
--- a/package.json
+++ b/package.json
@@ -25,7 +25,7 @@
     "tap": "tap ./test/{unit,integration}/*.js",
     "tap:unit": "tap ./test/unit/*.js",
     "tap:integration": "tap ./test/integration/*.js",
-    "test": "npm run lint && npm run docs && npm run tap",
+    "test": "npm run lint && npm run tap",
     "watch": "webpack --progress --colors --watch",
     "version": "json -f package.json -I -e \"this.repository.sha = '$(git log -n1 --pretty=format:%H)'\""
   },