Skip to content

Commit

Permalink
1.5.0 Add nyc and circleci
Browse files Browse the repository at this point in the history
  • Loading branch information
tyrion70 committed Sep 10, 2018
1 parent 71e9fa4 commit ff47703
Show file tree
Hide file tree
Showing 3 changed files with 1,459 additions and 2 deletions.
108 changes: 108 additions & 0 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,108 @@
version: 2

workflows:
version: 2
full_test:
jobs:
- prep-deps-npm
- test-lint:
requires:
- prep-deps-npm
- test-unit:
requires:
- prep-deps-npm
- test-browser:
requires:
- prep-deps-npm
- all-tests-pass:
requires:
- test-lint
- test-unit
- test-browser
- job-publish-release:
filters:
branches:
only: master
requires:
- prep-deps-npm
- all-tests-pass
jobs:
prep-deps-npm:
docker:
- image: circleci/node:10
steps:
- checkout
- restore_cache:
keys:
- v1.0-dependency-cache-{{ checksum "package-lock.json" }}
- run:
name: Install npm 6 + deps via npm
command: |
sudo npm install -g npm@6 && npm install --no-save
- persist_to_workspace:
root: .
paths:
- node_modules
test-lint:
docker:
- image: circleci/node:10
steps:
- checkout
- attach_workspace:
at: .
- run:
name: Test
command: npm run lint
test-browser:
docker:
- image: circleci/node:10-browsers
steps:
- checkout
- attach_workspace:
at: .
- run:
name: Test
command: npm run test:browser
test-unit:
docker:
- image: circleci/node:10
steps:
- checkout
- attach_workspace:
at: .
- run:
name: test:coverage
command: npm run test:coverage
all-tests-pass:
docker:
- image: circleci/node:10
steps:
- run:
name: All Tests Passed
command: echo 'weew - everything passed!'
job-publish-release:
context: NPM
docker:
- image: circleci/node:10
steps:
- checkout
- attach_workspace:
at: .
- run:
name: Authenticate with registry
command: echo "//registry.npmjs.org/:_authToken=$npm_TOKEN" > ~/.npmrc
- run:
name: "Run dist"
command: npm run build:es5
- run:
name: "Run docs"
command: npm run build:docs
- run:
name: "Publish Release on NPM"
command: npm publish
- store_artifacts:
path: es5
destination: es5
- store_artifacts:
path: docs
destination: docs

0 comments on commit ff47703

Please sign in to comment.