diff --git a/.github/workflows/unit-testing.yml b/.github/workflows/unit-testing.yml new file mode 100644 index 0000000..0b5a6cf --- /dev/null +++ b/.github/workflows/unit-testing.yml @@ -0,0 +1,19 @@ +name: unit-testing +on: push +jobs: + test: + runs-on: ubuntu-20.04 + steps: + - uses: actions/checkout@v2 + - uses: actions/setup-node@v2-beta + with: + node-version: '12.14' + - uses: actions/cache@v2 + with: + path: | + node_modules + */*/node_modules + key: ${{ runner.os }}-${{ hashFiles('**/yarn.lock') }} + - run: yarn install + - run: yarn test + - run: yarn coverage diff --git a/.npmignore b/.npmignore index daa6029..9041e7e 100644 --- a/.npmignore +++ b/.npmignore @@ -1 +1,3 @@ test.js +.eslintrc +.editorconfig diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index 4ead2ee..0000000 --- a/.travis.yml +++ /dev/null @@ -1,12 +0,0 @@ -dist: xenial -language: node_js -cache: npm -os: -- linux -env: - global: -node_js: -- '10' -script: -- npm test -- npm run coverage diff --git a/HEADER.md b/HEADER.md index 5ea3ad8..e3383a3 100644 --- a/HEADER.md +++ b/HEADER.md @@ -1,8 +1,12 @@ # mutant-json -[![Build Status](https://travis-ci.org/rubeniskov/mutant-json.svg?branch=master)](https://travis-ci.org/rubeniskov/mutant-json) -![npm-publish](https://github.com/rubeniskov/mutant-json/workflows/npm-publish/badge.svg) -[![Downloads](https://img.shields.io/npm/dw/mutant-json)](https://www.npmjs.com/package/mutant-json) +[![unit-testing](https://github.com/rubeniskov/mutant-json/workflows/unit-testing/badge.svg)](https://github.com/rubeniskov/mutant-json/actions?query=workflow%3Aunit-testing) +[![npm-publish](https://github.com/rubeniskov/mutant-json/workflows/npm-publish/badge.svg)](https://github.com/rubeniskov/mutant-json/actions?query=workflow%3Anpm-publish) +[![npm-downloads](https://img.shields.io/npm/dw/mutant-json)](https://www.npmjs.com/package/mutant-json) +[![codecov](https://codecov.io/gh/rubeniskov/mutant-json/branch/master/graph/badge.svg)](https://codecov.io/gh/rubeniskov/mutant-json) +[![patreon-donate](https://img.shields.io/badge/patreon-donate-yellow.svg)](https://patreon.com/rubeniskov) +[![github-sponsor](https://img.shields.io/badge/github-donate-yellow.svg)](https://github.com/sponsors/rubeniskov) +[![paypal-sponsor](https://img.shields.io/badge/paypal-donate-yellow.svg)](https://paypal.me/rubeniskov) A complete mutant json which uses [traverse-json](https://github.com/rubeniskov/traverse-json) to enable traverse filtering. diff --git a/LICENSE b/LICENSE new file mode 100644 index 0000000..6c5771d --- /dev/null +++ b/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2020 mutant-json + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/README.md b/README.md index a040195..6a7c54e 100644 --- a/README.md +++ b/README.md @@ -1,8 +1,12 @@ # mutant-json -[![Build Status](https://travis-ci.org/rubeniskov/mutant-json.svg?branch=master)](https://travis-ci.org/rubeniskov/mutant-json) -![npm-publish](https://github.com/rubeniskov/mutant-json/workflows/npm-publish/badge.svg) -[![Downloads](https://img.shields.io/npm/dw/mutant-json)](https://www.npmjs.com/package/mutant-json) +[![unit-testing](https://github.com/rubeniskov/mutant-json/workflows/unit-testing/badge.svg)](https://github.com/rubeniskov/mutant-json/actions?query=workflow%3Aunit-testing) +[![npm-publish](https://github.com/rubeniskov/mutant-json/workflows/npm-publish/badge.svg)](https://github.com/rubeniskov/mutant-json/actions?query=workflow%3Anpm-publish) +[![npm-downloads](https://img.shields.io/npm/dw/mutant-json)](https://www.npmjs.com/package/mutant-json) +[![codecov](https://codecov.io/gh/rubeniskov/mutant-json/branch/master/graph/badge.svg)](https://codecov.io/gh/rubeniskov/mutant-json) +[![patreon-donate](https://img.shields.io/badge/patreon-donate-yellow.svg)](https://patreon.com/rubeniskov) +[![github-sponsor](https://img.shields.io/badge/github-donate-yellow.svg)](https://github.com/sponsors/rubeniskov) +[![paypal-sponsor](https://img.shields.io/badge/paypal-donate-yellow.svg)](https://paypal.me/rubeniskov) A complete mutant json which uses [traverse-json](https://github.com/rubeniskov/traverse-json) to enable traverse filtering. diff --git a/package.json b/package.json index e9cddca..e00cf51 100644 --- a/package.json +++ b/package.json @@ -9,10 +9,19 @@ "test": "nyc ava -v", "docs": "{ cat HEADER.md; jsdoc2md index.js; } > README.md", "coverage": "nyc report --reporter=lcov --reporter=text", + "postcoverage": "codecov", "report": "nyc report --reporter=html && http-server -o coverage" }, - "author": "", - "license": "ISC", + "repository": { + "type": "git", + "url": "git+https://github.com/rubeniskov/mutant-json.git" + }, + "author": "rubeniskov (http://rubeniskov.com)", + "license": "MIT", + "bugs": { + "url": "https://github.com/rubeniskov/mutant-json/issues" + }, + "homepage": "https://github.com/rubeniskov/mutant-json#readme", "husky": { "hooks": { "pre-commit": "npm run lint", @@ -24,7 +33,8 @@ "eslint": "^7.14.0", "http-server": "^0.12.3", "jsdoc-to-markdown": "^6.0.1", - "nyc": "^15.1.0" + "nyc": "^15.1.0", + "codecov": "^3.8.1" }, "dependencies": { "traverse-json": "^0.5.1",