Skip to content

Commit

Permalink
Create config.yml (#64)
Browse files Browse the repository at this point in the history
test against node 6,8,10 and latest (11)
  • Loading branch information
Jussi Vatjus-Anttila committed Jan 27, 2019
1 parent 6d89cce commit acd6538
Show file tree
Hide file tree
Showing 2 changed files with 116 additions and 18 deletions.
116 changes: 116 additions & 0 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,116 @@
version: 2

workflows:
version: 2
test-publish:
jobs:
- test-node6:
filters: # required since `deploy` has tag filters AND requires `build`
tags:
only: /.*/
- test-node8:
filters: # required since `deploy` has tag filters AND requires `build`
tags:
only: /.*/
- test-node10:
filters: # required since `deploy` has tag filters AND requires `build`
tags:
only: /.*/
- test-node-latest:
filters: # required since `deploy` has tag filters AND requires `build`
tags:
only: /.*/
- publish:
requires:
- test-node6
- test-node8
- test-node10
- test-node-latest
filters:
tags:
only: /^v.*/
branches:
ignore: /.*/


defaults: &defaults
working_directory: ~/repo
docker:
- image: circleci/node:6.11.4
steps:
- checkout
- run: node --version > _tmp_file
- restore_cache:
key: dependency-cache-{{ checksum "_tmp_file" }}-{{ checksum "package.json" }}
- run:
name: npm-install
command: npm install

- save_cache:
key: dependency-cache-{{ checksum "_tmp_file" }}-{{ checksum "package.json" }}
paths:
- ./node_modules
- run:
name: test
command: npm test
environment:
REPORTER: mocha-circleci-reporter
MOCHA_FILE: junit/test-results.xml
#- run:
# name: coveralls
# command: cat ./coverage/lcov.info | ./node_modules/coveralls/bin/coveralls.js
- run:
name: lint
command: npm run lint
when: always
- store_test_results:
path: junit
- store_artifacts:
path: junit
#- store_artifacts:
# path: coverage
# prefix: coverage
#- store_test_results:
# path: coverage/coverage.json
jobs:
test-node6:
<<: *defaults
docker:
- image: circleci/node:6.14.4-browsers
environment:
CHROME_BIN: "/usr/bin/google-chrome"
- image: mongo:4.1.2
test-node8:
<<: *defaults
docker:
- image: circleci/node:8.12.0-browsers
environment:
CHROME_BIN: "/usr/bin/google-chrome"
- image: mongo:4.1.2
test-node10:
<<: *defaults
docker:
- image: circleci/node:10.14.1-browsers
environment:
CHROME_BIN: "/usr/bin/google-chrome"
- image: mongo:4.1.2
test-node-latest:
<<: *defaults
docker:
- image: circleci/node:latest-browsers
environment:
CHROME_BIN: "/usr/bin/google-chrome"
- image: mongo:4.1.2
publish:
<<: *defaults
steps:
- checkout
- run: node --version > _tmp_file
- restore_cache:
key: dependency-cache-{{ checksum "_tmp_file" }}-{{ checksum "package.json" }}
- run:
name: Authenticate with registry
command: echo "//registry.npmjs.org/:_authToken=$NPM_TOKEN" > ~/repo/.npmrc
- run:
name: Publish package
command: npm publish
18 changes: 0 additions & 18 deletions .travis.yml

This file was deleted.

0 comments on commit acd6538

Please sign in to comment.