build: add CI

This commit is contained in:
Samuel Attard
2020-11-13 12:57:03 -08:00
parent 20e56d9c40
commit 395c31eb71
4 changed files with 52 additions and 64 deletions

46
.circleci/config.yml Normal file
View File

@@ -0,0 +1,46 @@
step-restore-cache: &step-restore-cache
restore_cache:
keys:
- v1-dependencies-{{ arch }}-{{ checksum "yarn.lock" }}
- v1-dependencies-{{ arch }}
steps-test: &steps-test
steps:
- checkout
- *step-restore-cache
- run: yarn --frozen-lockfile
- save_cache:
paths:
- node_modules
key: v1-dependencies-{{ arch }}-{{ checksum "yarn.lock" }}
- run: yarn build
- run: yarn test
version: 2.1
jobs:
test:
macos:
xcode: "12.2.0"
<<: *steps-test
release:
docker:
- image: circleci/node:10.15
steps:
- checkout
- *step-restore-cache
- run: yarn --frozen-lockfile
- run: npx semantic-release
workflows:
version: 2
test_and_release:
jobs:
- test
- release:
requires:
- test
filters:
branches:
only:
- master