Skip to content

Commit

Permalink
Update circleci config
Browse files Browse the repository at this point in the history
  • Loading branch information
3846masa committed Jul 21, 2019
1 parent 6babd9c commit 7a6193e
Show file tree
Hide file tree
Showing 3 changed files with 84 additions and 23 deletions.
82 changes: 82 additions & 0 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,82 @@
# Javascript Node CircleCI 2.0 configuration file
#
# Check https://circleci.com/docs/2.0/language-javascript/ for more details
#
version: 2
jobs:
build:
docker:
- image: circleci/node:8
steps:
- checkout
- restore_cache:
key: v1-yarn-cache
- restore_cache:
key: v1-yarn-deps-{{ checksum "yarn.lock" }}
- run: yarn install
- save_cache:
paths:
- ~/.yarn-cache
key: v1-yarn-cache
- save_cache:
paths:
- node_modules
key: v1-yarn-deps-{{ checksum "yarn.lock" }}
- run: yarn build
- save_cache:
paths:
- lib
key: v1-build-{{ .Environment.CIRCLE_SHA1 }}
test:
docker:
- image: circleci/node:8
steps:
- checkout
- restore_cache:
key: v1-yarn-cache
- restore_cache:
key: v1-yarn-deps-{{ checksum "yarn.lock" }}
- restore_cache:
key: v1-build-{{ .Environment.CIRCLE_SHA1 }}
- run: yarn install
- run: yarn test
deploy-npm:
docker:
- image: circleci/node:8
steps:
- checkout
- restore_cache:
key: v1-yarn-cache
- restore_cache:
key: v1-yarn-deps-{{ checksum "yarn.lock" }}
- restore_cache:
key: v1-build-{{ .Environment.CIRCLE_SHA1 }}
- run: yarn install
- run:
command: |
echo "//registry.npmjs.org/:_authToken=$NPM_TOKEN" >> ~/.npmrc
npm publish --access public
workflows:
version: 2
build-deploy:
jobs:
- build:
filters:
tags:
only: /.*/
- test:
requires:
- build
filters:
tags:
only: /.*/
- deploy-npm:
context: npm
requires:
- build
- test
filters:
tags:
only: /v\d+(\.\d+)*/
branches:
ignore: /.*/
22 changes: 0 additions & 22 deletions circle.yml

This file was deleted.

3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,8 @@
"build:peg:inlineMath": "pegjs -o ./lib/peg/inlineMath.js ./src/peg/inlineMath.pegjs",
"build:peg:math": "pegjs -o ./lib/peg/math.js ./src/peg/math.pegjs",
"build:tsc": "tsc",
"clean": "rimraf lib"
"clean": "rimraf lib",
"test": "exit 0"
},
"types": "lib/index.d.ts",
"dependencies": {
Expand Down

0 comments on commit 7a6193e

Please sign in to comment.