Skip to content

Commit

Permalink
chore(ci): Config circle ci (#207)
Browse files Browse the repository at this point in the history
* chore: add circleci

* chore: add circle-ci
* also use npm ci for testing installs, which requires the package-lock and package.json to be in sync
  • Loading branch information
lholmquist authored Apr 6, 2020
1 parent 1992c71 commit afa3557
Show file tree
Hide file tree
Showing 2 changed files with 50 additions and 1 deletion.
49 changes: 49 additions & 0 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
# Javascript Node CircleCI 2.1 configuration file
#
# Check https://circleci.com/docs/2.0/language-javascript/ for more details
#
version: 2.1

commands:
test-nodejs:
steps:
- run:
name: 'Output Node Version'
command: 'node -v'

- checkout

# install with npm ci to make sure package.json and lock are N'Sync
# No need to cache node_modules since npm ci will delete it
- run: npm ci

# run tests!
- run: npm run ci

jobs:
node10:
docker:
- image: circleci/node:10
steps:
- test-nodejs

node12:
docker:
- image: circleci/node:12
steps:
- test-nodejs

workflows:
version: 2
test_node_versions:
jobs:
- node10:
filters:
branches:
ignore:
- gh-pages
- node12:
filters:
branches:
ignore:
- gh-pages
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
"test": "tape test/*-test.js | tap-spec",
"coverage": "nyc npm test",
"coverage:html": "nyc npm test && nyc report --reporter=html",
"coveralls": "nyc npm test && nyc report --reporter=text-lcov | coveralls",
"coveralls": "nyc npm test && nyc report && if [ $COVERALLS_REPO_TOKEN'' != '' ] ; then nyc report --reporter=text-lcov | coveralls; fi",
"ci": "npm run lint && npm run coveralls",
"docs": "documentation build lib/** -f html -o docs",
"release": "standard-version -a"
Expand Down

0 comments on commit afa3557

Please sign in to comment.