-
Notifications
You must be signed in to change notification settings - Fork 20
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
test against node 6,8,10 and latest (11)
- Loading branch information
Jussi Vatjus-Anttila
committed
Jan 27, 2019
1 parent
6d89cce
commit acd6538
Showing
2 changed files
with
116 additions
and
18 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file was deleted.
Oops, something went wrong.