Skip to content

Commit

Permalink
Add CircleCI
Browse files Browse the repository at this point in the history
  • Loading branch information
pelle committed Mar 21, 2019
1 parent acc7563 commit 42c228a
Show file tree
Hide file tree
Showing 2 changed files with 40 additions and 0 deletions.
38 changes: 38 additions & 0 deletions .circleci/config.yml
@@ -0,0 +1,38 @@
version: 2
jobs:
build:
working_directory: ~/did-jwt
docker:
- image: circleci/node:8
steps:
- checkout

# Download and cache dependencies
- restore_cache:
keys:
- dependencies-cache-{{ checksum "package.json" }}

- run:
name: install-dependencies
command: |
sudo npm i -g codecov node-gyp
npm install
- run:
name: test
command: npm run test:ci && codecov

- run:
name: code-coverage
command: bash <(curl -s https://codecov.io/bash)

- save_cache:
key: dependency-cache-{{ checksum "package.json" }}
paths:
- ./node_modules

workflows:
version: 2
build-and-deploy:
jobs:
- build
2 changes: 2 additions & 0 deletions package.json
Expand Up @@ -4,6 +4,7 @@
"description": "Create and manage DID documents for ethereum addresses",
"main": "lib/index.js",
"module": "lib/index.esm.js",
"umd:main": "lib/index.umd.js",
"source": "src/index.js",
"repository": {
"type": "git",
Expand All @@ -21,6 +22,7 @@
"scripts": {
"format": "prettier-standard 'src/**/*.js'",
"test": "./node_modules/.bin/standard && ./node_modules/.bin/jest",
"test:ci": "./node_modules/.bin/standard && ./node_modules/.bin/jest -u --coverage",
"build:js": "./node_modules/.bin/microbundle",
"build": "npm run format && npm run build:js && npm run test",
"prepare": "npm run build"
Expand Down

0 comments on commit 42c228a

Please sign in to comment.