Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

teste #320

Open
wants to merge 129 commits into
base: branching
Choose a base branch
from
Open

teste #320

Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
129 commits
Select commit Hold shift + click to select a range
f94b647
Get PR number from TRAVIS
Hirse Oct 14, 2016
99edf1a
Fix node-uuid deprecation by updating request dependency
hyperlink Dec 13, 2016
cc0882d
Update outdate dependencies
ndaidong Jan 10, 2017
dd230f6
don't hardcode minor version
a0viedo Jan 18, 2017
d117e3d
reenable drone
kasperlewau Jan 31, 2017
3edbecb
Merge pull request #155 from kasperlewau/master
nickmerwin Feb 5, 2017
87b27f7
Merge pull request #142 from Hirse/feature/travis-pr
nickmerwin Feb 5, 2017
72a4046
Merge pull request #154 from a0viedo/patch-1
nickmerwin Feb 5, 2017
de968b0
Merge pull request #147 from hyperlink/update-request-dep
nickmerwin Feb 5, 2017
f390392
Merge pull request #152 from ndaidong/master
nickmerwin Feb 5, 2017
671acca
removed codeship badge
nickmerwin Feb 5, 2017
4bc93ac
Merge branch 'master' of github.com:nickmerwin/node-coveralls
nickmerwin Feb 5, 2017
8dfcfd6
version bump
nickmerwin Feb 5, 2017
d571dac
merge, version bump
nickmerwin Mar 5, 2017
63a7f92
Update README.md
evanjbowling Mar 25, 2017
e476964
Merge pull request #162 from evanjbowling/patch-1
nickmerwin Mar 26, 2017
ef7e811
Parse commit from packed refs if not available in refs dir. (#163)
Mar 30, 2017
2821200
version bump
nickmerwin Mar 30, 2017
b9032a1
better Jenkins detection
nickmerwin Apr 27, 2017
eb1b723
Update Mocha link (#169)
mortonfox Sep 27, 2017
428780c
Expand allowed dependency versions to all API compatible versions (#172)
mdlavin Sep 28, 2017
5ebe57f
bump version
nickmerwin Sep 28, 2017
2ed4d09
major version bump for node > 4.x
nickmerwin Sep 28, 2017
83ff2cb
Add mention about AppVeyor to the README (#164)
honzajavorek Sep 28, 2017
720ee7c
Add license (#175)
honzajavorek May 1, 2018
10d8b3e
Update examples to include Jest (#183)
Ethan-Arrowood May 1, 2018
bd667c6
Add Semaphore support (#180)
manuphatak May 1, 2018
18c71c2
Fix a mistype in tests: fs.exists -> fs.existsSync (#184)
ChALkeR May 1, 2018
aa8c257
Done callback waits for unlink in testRepoTokenDetection to prevent r…
May 1, 2018
9cfb496
Add buildkite support (#177)
May 1, 2018
9b892bf
Verbose use log level `debug`
mattkime May 1, 2018
e7ae2bf
version bump; logger test fix
nickmerwin May 1, 2018
a96ab26
updated dependencies
nickmerwin May 1, 2018
231f12f
Adds support for named job flags (#196)
Jun 29, 2018
cc67125
bump version; updated .snyk
nickmerwin Jun 29, 2018
aa2519c
dependency security audit fixes from npm & snyk (#210)
nickmerwin Feb 22, 2019
4df732b
Style fix (#211)
mikaelmello Mar 15, 2019
f5549c7
Bump handlebars from 4.1.0 to 4.1.2 (#224)
dependabot[bot] Jun 5, 2019
33119a7
Bump js-yaml from 3.11.0 to 3.13.1 (#225)
dependabot[bot] Jun 5, 2019
9d9c227
Bump extend from 3.0.1 to 3.0.2 (#226)
dependabot[bot] Jun 5, 2019
8ac4325
version bump
nickmerwin Jun 5, 2019
f0ddec5
Add support for Azure Pipelines (#221)
dylan-smith Jun 5, 2019
cf1921d
Update configuration logic for Jenkins (#217)
posquit0 Jun 5, 2019
2c73fc8
Bump lodash from 4.17.11 to 4.17.14 (#229)
dependabot[bot] Jul 12, 2019
0c147a8
fix: vulnerabilities (#227)
waitingsong Jul 12, 2019
b94fd9a
version bump
nickmerwin Jul 12, 2019
55fc4d8
Merge branch 'master' of https://github.com/nickmerwin/node-coveralls
nickmerwin Jul 12, 2019
e55883a
COVERALLS_PARALLEL docs link update
nickmerwin Jul 25, 2019
d3045b4
handleInput callback include body
nickmerwin Aug 6, 2019
1e09691
Merge branch 'master' of https://github.com/nickmerwin/node-coveralls
nickmerwin Aug 6, 2019
2ed185c
added support for GitLab Merge Request IID
nickmerwin Oct 10, 2019
150e39b
Add AppVeyor test.
XhmikosR Oct 26, 2019
593d1be
add ability to parse cobertura files
ly-cultureiq Oct 31, 2019
6a10cbd
Switch to npm scripts.
XhmikosR Oct 9, 2019
0a25fda
Switch to nyc
XhmikosR Oct 26, 2019
19a13ad
Switch to GitHub Actions CI.
XhmikosR Oct 9, 2019
7696be4
Remove the unused growl dependency.
XhmikosR Nov 15, 2019
e8f3dbd
package.json: specify the files to include (#233)
XhmikosR Nov 21, 2019
16cb16f
Update dependencies except for should. (#234)
XhmikosR Nov 21, 2019
2fbcf4b
Merge branch 'master' into pr/235
nickmerwin Nov 21, 2019
217402c
Merge branch 'master' into pr/236
nickmerwin Nov 21, 2019
cbc1bdf
Update test.yml
nickmerwin Nov 21, 2019
eba01a2
Fix tests on Windows. (#237)
XhmikosR Nov 21, 2019
336123f
ES6
nickmerwin Nov 21, 2019
9d9134b
npm install
nickmerwin Nov 21, 2019
0a351ed
Merge branch 'XhmikosR-rm-growl'
nickmerwin Nov 21, 2019
0d13be9
Merge branch 'master' of https://github.com/nickmerwin/node-coveralls
nickmerwin Nov 21, 2019
06459ae
Remove `path.existsSync` (#248)
XhmikosR Nov 21, 2019
571b38a
fix: pass flag_name to coveralls API (#251)
joscha Nov 21, 2019
ee636f6
fix typos
nickmerwin Nov 21, 2019
e48a66d
Merge branch 'add_cobertura_support' of https://github.com/ly-culture…
nickmerwin Nov 21, 2019
51890f8
Merge branch 'ly-cultureiq-add_cobertura_support'
nickmerwin Nov 21, 2019
ba49b6d
Merge branch 'appveyor-tests' of https://github.com/XhmikosR/node-cov…
nickmerwin Nov 21, 2019
7c6178f
Merge branch 'XhmikosR-appveyor-tests'
nickmerwin Nov 21, 2019
b1f7950
version bump
nickmerwin Nov 21, 2019
3d82534
use Coveralls GitHub action
nickmerwin Nov 25, 2019
c202346
Fix Windows tests again.
XhmikosR Nov 21, 2019
ef51945
CI: Add Windows testing and lint
XhmikosR Nov 21, 2019
be79dab
CI: use `npm ci` on Node.js >=8.
XhmikosR Nov 21, 2019
0488f10
Tweak README.md
XhmikosR Nov 22, 2019
f58f8b9
README.md: Add GitHub Actions CI info.
XhmikosR Nov 22, 2019
07ef879
Fix logger regression.
XhmikosR Nov 22, 2019
bbe2de5
Update package.json
XhmikosR Nov 21, 2019
3a90b07
fix equality operator in logger.js
nickmerwin Nov 25, 2019
236529b
Update logger.js
nickmerwin Nov 25, 2019
33eccc3
Revert "CI: use `npm ci` on Node.js >=8."
XhmikosR Nov 26, 2019
4aa11a2
Remove snyk.
XhmikosR Nov 14, 2019
1bceeff
Revert #243.
XhmikosR Nov 21, 2019
50913ed
Remove the now unused istanbul and mocha-lcov-reporter devDependencies
XhmikosR Nov 21, 2019
2e2b108
bump version
nickmerwin Nov 26, 2019
eb1a3c9
278 Upgrades minimist dependency to 1.2.5
ashishkujoy Mar 18, 2020
8c4ba99
CI: switch to `actions/checkout@v2`
XhmikosR Dec 13, 2019
710c504
Add Codefresh support
suda Dec 11, 2019
3d83b4f
Set service_name and/or repo_token from .coveralls.yml regardless of …
benpetty Mar 19, 2020
5e976c5
Only coverage report on test success, fixes #230
AndreMiras Dec 7, 2019
2ea7be3
bump version
nickmerwin Mar 19, 2020
b010d3d
If COVERALLS_SERVICE_NUMBER is set, set service_number from it. (#208)
midgleyc Mar 19, 2020
21f476c
added COVERALLS_SERVICE_NUMBER to Readme; ver bump
nickmerwin Mar 19, 2020
7ffe6dc
Update getOptions.js
nickmerwin Apr 21, 2020
49d0f76
3.0.12
nickmerwin Apr 21, 2020
aaff7f8
fix test
nickmerwin Apr 21, 2020
2f2426b
pass flag_name to API post JSON
nickmerwin Apr 21, 2020
eaba7c6
3.0.13
nickmerwin Apr 21, 2020
ff21930
remove redundant code (#283)
lpinca Apr 22, 2020
3647673
Minor lint tweaks (#285)
XhmikosR Apr 23, 2020
1615297
GH Action workflow update (#287)
nickmerwin Apr 23, 2020
a0c6941
Move fixtures to test/fixtures. (#286)
XhmikosR Apr 23, 2020
59a57e2
Update safe dependencies and fix npm vulnerabilities (#284)
XhmikosR Apr 23, 2020
844d765
3.0.14
nickmerwin Apr 23, 2020
eb6dc35
Update sinon to v7.5.0. (#288)
XhmikosR Apr 24, 2020
705c3b5
Handle service_job_number for parallelism in Travis and CircleCI (#290)
nickmerwin Apr 24, 2020
2f95964
3.1.0
nickmerwin Apr 24, 2020
536f3c2
readme re: flag names, CircleCI Orb
nickmerwin Apr 24, 2020
55c64cb
update README with links to demo repo
nickmerwin Apr 24, 2020
14e8b44
readme typo
nickmerwin Apr 24, 2020
80bc04e
Minor CI tweaks
XhmikosR Apr 25, 2020
41df01b
Switch to `xo@0.24.0` for linting
XhmikosR Nov 14, 2019
fa8ab4c
tests: fix deprecation warning coming from `sinon.sandbox.create()`
XhmikosR Apr 25, 2020
affd0f0
Update sinon to v.8.x.
XhmikosR Apr 25, 2020
3f808ee
package.json: reorder properties and add homepage
XhmikosR Nov 30, 2019
f4dee84
Regenerate package-lock.json
XhmikosR May 1, 2020
65fd013
xo: make `handle-callback-err` an error.
XhmikosR May 1, 2020
21f7b1d
Update README.md
XhmikosR May 1, 2020
3bf6386
Bump ini from 1.3.5 to 1.3.7
dependabot[bot] Dec 10, 2020
9598930
Bump y18n from 4.0.0 to 4.0.1
dependabot[bot] Mar 29, 2021
326abbc
Bump lodash from 4.17.15 to 4.17.21
dependabot[bot] May 7, 2021
59643bc
Bump hosted-git-info from 2.8.8 to 2.8.9
dependabot[bot] May 9, 2021
79c97ba
Bump dot-prop from 4.2.0 to 4.2.1
dependabot[bot] Jun 29, 2021
565da5f
swap exec for execFile in fetchGitData
nickmerwin Jun 29, 2021
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
50 changes: 50 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
name: Tests
on: [push, pull_request]
env:
CI: true

jobs:
test:
name: Node ${{ matrix.node }} on ${{ matrix.os }}
runs-on: ${{ matrix.os }}

strategy:
fail-fast: false
matrix:
node: [6, 8, 10, 12, 14]
os: [ubuntu-latest, windows-latest]

steps:
- name: Clone repository
uses: actions/checkout@v2

- name: Set Node.js version
uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node }}

- name: Install npm dependencies
run: npm install # switch to `npm ci` when Node.js 6 support is dropped

- name: Run lint
run: npm run lint

- name: Run tests
run: npm run test-cov

- name: Coveralls
uses: coverallsapp/github-action@master
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
flag-name: ${{matrix.os}}-node-${{ matrix.node }}
parallel: true

finish:
needs: test
runs-on: ubuntu-latest
steps:
- name: Coveralls Finished
uses: coverallsapp/github-action@master
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
parallel-finished: true
5 changes: 5 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
node_modules/
coverage/
lib-cov/
.nyc_output/
coverage.json
npm-debug.log

# Webstorm IDE
.idea
.DS_Store
1 change: 0 additions & 1 deletion .snyk

This file was deleted.

11 changes: 0 additions & 11 deletions .travis.yml

This file was deleted.

26 changes: 26 additions & 0 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
Copyright (c) 2013, Coveralls, Inc.
All rights reserved.

Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:

1. Redistributions of source code must retain the above copyright notice, this
list of conditions and the following disclaimer.
2. Redistributions in binary form must reproduce the above copyright notice,
this list of conditions and the following disclaimer in the documentation
and/or other materials provided with the distribution.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

The views and conclusions contained in the software and documentation are those
of the authors and should not be interpreted as representing official policies,
either expressed or implied, of Coveralls, LLC.
20 changes: 0 additions & 20 deletions Makefile

This file was deleted.

163 changes: 107 additions & 56 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,84 +1,132 @@
#node-coveralls
# node-coveralls

[![Build Status][travis-image]][travis-url] [![Coverage Status][coveralls-image]][coveralls-url] [![Codeship Build Status][codeship-image]][codeship-url]
[![Known Vulnerabilities](https://snyk.io/test/github/nickmerwin/node-coveralls/badge.svg)](https://snyk.io/test/github/nickmerwin/node-coveralls)
[![Build Status][ci-image]][ci-url] [![Coverage Status][coveralls-image]][coveralls-url]

[Coveralls.io](https://coveralls.io/) support for node.js. Get the great coverage reporting of coveralls.io and add a cool coverage button ( like the one above ) to your README.
[Coveralls.io](https://coveralls.io/) support for Node.js. Get the great coverage reporting of coveralls.io and add a cool coverage button (like the one above) to your README.

Supported CI services: [travis-ci](https://travis-ci.org/), [codeship](https://www.codeship.io/), [circleci](https://circleci.com/), [jenkins](http://jenkins-ci.org/), [Gitlab CI](http://gitlab.com/)
## Supported CI services:

* [Travis CI](https://travis-ci.org/)
* [CodeShip](https://codeship.com/)
* [CircleCI](https://circleci.com/)
* [Jenkins](https://jenkins.io/)
* [Gitlab CI](https://gitlab.com/)
* [AppVeyor](https://www.appveyor.com/)
* [Buildkite](https://buildkite.com/)
* [GitHub Actions CI](https://github.com/features/actions)
* [CodeFresh](https://codefresh.io/)

## Installation:

##Installation:
Add the latest version of `coveralls` to your package.json:
```

```shell
npm install coveralls --save-dev
```

If you're using mocha, add `mocha-lcov-reporter` to your package.json:
```

```shell
npm install mocha-lcov-reporter --save-dev
```

##Usage:
## Usage:

This script ( `bin/coveralls.js` ) can take standard input from any tool that emits the lcov data format (including [mocha](http://mochajs.org/)'s [LCov reporter](https://npmjs.org/package/mocha-lcov-reporter)) and send it to coveralls.io to report your code coverage there.
This script `bin/coveralls.js` can take standard input from any tool that emits the lcov data format (including [mocha](https://mochajs.org/)'s [LCOV reporter](https://npmjs.org/package/mocha-lcov-reporter)) and send it to coveralls.io to report your code coverage there.

Once your app is instrumented for coverage, and building, you need to pipe the lcov output to `./node_modules/coveralls/bin/coveralls.js`.

This library currently supports [travis-ci](https://travis-ci.org/) with no extra effort beyond piping the lcov output to coveralls. However, if you're using a different build system, there are a few environment variables that are necessary:
* COVERALLS_SERVICE_NAME (the name of your build system)
* COVERALLS_REPO_TOKEN (the secret repo token from coveralls.io)
This library currently supports [Travis CI](https://travis-ci.org/) with no extra effort beyond piping the lcov output to coveralls. However, if you're using a different build system, there are a few **necessary** environment variables:

- `COVERALLS_SERVICE_NAME` (the name of your build system)
- `COVERALLS_REPO_TOKEN` (the secret repo token from coveralls.io)
- `COVERALLS_GIT_BRANCH` (the branch name)

There are optional environment variables for other build systems as well:
* COVERALLS_SERVICE_JOB_ID (an id that uniquely identifies the build job)
* COVERALLS_RUN_AT (a date string for the time that the job ran. RFC 3339 dates work. This defaults to your
build system's date/time if you don't set it.)
* COVERALLS_PARALLEL (more info here: https://coveralls.zendesk.com/hc/en-us/articles/203484329)

### [Mocha](http://mochajs.org/) + [Blanket.js](https://github.com/alex-seville/blanket)
- Install [blanket.js](http://blanketjs.org/)
- `COVERALLS_FLAG_NAME` (a flag name to differentiate jobs, e.g. Unit, Functional, Integration)
- `COVERALLS_SERVICE_NUMBER` (a number that uniquely identifies the build)
- `COVERALLS_SERVICE_JOB_ID` (an ID that uniquely identifies the build's job)
- `COVERALLS_SERVICE_JOB_NUMBER` (a number that uniquely identifies the build's job)
- `COVERALLS_RUN_AT` (a date string for the time that the job ran. RFC 3339 dates work. This defaults to your build system's date/time if you don't set it)
- `COVERALLS_PARALLEL` (set to `true` when running jobs in parallel, requires a completion webhook. More info here: <https://docs.coveralls.io/parallel-build-webhook>)

### GitHub Actions CI

If you are using GitHub Actions CI, you should look into [coverallsapp/github-action](https://github.com/coverallsapp/github-action).

Parallel runs example [workflow.yml](https://github.com/coverallsapp/coveralls-node-demo/blob/master/.github/workflows/workflow.yml)

### [CircleCI Orb](https://circleci.com/)

Here's our Orb for quick integration: [coveralls/coveralls](https://circleci.com/orbs/registry/orb/coveralls/coveralls)

Workflow example: [config.yml](https://github.com/coverallsapp/coveralls-node-demo/blob/master/.circleci/config.yml)

### [Travis-CI](https://travis-ci.org/)

Parallel jobs example: [.travis.yml](https://github.com/coverallsapp/coveralls-node-demo/blob/master/.travis.yml)

### [Jest](https://jestjs.io/)

- Install [jest](https://jestjs.io/docs/en/getting-started)
- Use the following to run tests and push files to coveralls on success:

```sh
jest --coverage && coveralls < coverage/lcov.info
```

Check out an example [here](https://github.com/Ethan-Arrowood/harperdb-connect/blob/master/.travis.yml) which makes use of Travis CI build stages

### [Mocha](https://mochajs.org/) + [Blanket.js](https://github.com/alex-seville/blanket)

- Install [blanket.js](https://github.com/alex-seville/blanket)
- Configure blanket according to [docs](https://github.com/alex-seville/blanket/blob/master/docs/getting_started_node.md).
- Run your tests with a command like this:

```sh
NODE_ENV=test YOURPACKAGE_COVERAGE=1 ./node_modules/.bin/mocha \
--require blanket \
--reporter mocha-lcov-reporter | ./node_modules/coveralls/bin/coveralls.js
```
### [Mocha](http://mochajs.org/) + [JSCoverage](https://github.com/fishbar/jscoverage)
```sh
NODE_ENV=test YOURPACKAGE_COVERAGE=1 ./node_modules/.bin/mocha \
--require blanket \
--reporter mocha-lcov-reporter | ./node_modules/coveralls/bin/coveralls.js
```

### [Mocha](https://mochajs.org/) + [JSCoverage](https://github.com/fishbar/jscoverage)

Instrumenting your app for coverage is probably harder than it needs to be (read [here](http://www.seejohncode.com/2012/03/13/setting-up-mocha-jscoverage/)), but that's also a necessary step.
Instrumenting your app for coverage is probably harder than it needs to be (read [here](http://seejohncode.com/2012/03/13/setting-up-mocha-jscoverage/)), but that's also a necessary step.

In mocha, if you've got your code instrumented for coverage, the command for a Travis CI build would look something like this:

In mocha, if you've got your code instrumented for coverage, the command for a travis build would look something like this:
```sh
YOURPACKAGE_COVERAGE=1 ./node_modules/.bin/mocha test -R mocha-lcov-reporter | ./node_modules/coveralls/bin/coveralls.js
```
Check out an example [Makefile](https://github.com/cainus/urlgrey/blob/master/Makefile) from one of my projects for an example, especially the test-coveralls build target. Note: Travis runs `npm test`, so whatever target you create in your Makefile must be the target that `npm test` runs (This is set in package.json's 'scripts' property).

Check out an example [Makefile](https://github.com/cainus/urlgrey/blob/master/Makefile) from one of my projects for an example, especially the test-coveralls build target. Note: Travis CI runs `npm test`, so whatever target you create in your Makefile must be the target that `npm test` runs (This is set in package.json's `scripts` property).

### [Istanbul](https://github.com/gotwarlost/istanbul)

**With Mocha:**
#### With Mocha:

```sh
istanbul cover ./node_modules/mocha/bin/_mocha --report lcovonly -- -R spec && cat ./coverage/lcov.info | ./node_modules/coveralls/bin/coveralls.js && rm -rf ./coverage
```

**With Jasmine:**
#### With Jasmine:

```sh
istanbul cover jasmine-node --captureExceptions spec/ && cat ./coverage/lcov.info | ./node_modules/coveralls/bin/coveralls.js && rm -rf ./coverage
```

### [Nodeunit](https://github.com/caolan/nodeunit) + [JSCoverage](https://github.com/fishbar/jscoverage)

Depend on nodeunit, jscoverage and coveralls:
Depend on nodeunit, jscoverage, and coveralls:

```sh
npm install nodeunit jscoverage coveralls --save-dev
```

Add a coveralls script to "scripts" in your `package.json`:

```javascript
```json
"scripts": {
"test": "nodeunit test",
"coveralls": "jscoverage lib && YOURPACKAGE_COVERAGE=1 nodeunit --reporter=lcov test | coveralls"
Expand All @@ -93,64 +141,67 @@ Run your tests with a command like this:
npm run coveralls
```

For detailed instructions on requiring instrumented code, running on Travis and submitting to coveralls [see this guide](https://github.com/alanshaw/nodeunit-lcov-coveralls-example).
For detailed instructions on requiring instrumented code, running on Travis CI and submitting to coveralls [see this guide](https://github.com/alanshaw/nodeunit-lcov-coveralls-example).

### [Poncho](https://github.com/deepsweet/poncho)
Client-side JS code coverage using [PhantomJS](https://github.com/ariya/phantomjs), [Mocha](http://mochajs.org/) and [Blanket](https://github.com/alex-seville/blanket):
- [Configure](http://visionmedia.github.io/mocha/#browser-support) Mocha for browser
- [Mark](https://github.com/deepsweet/poncho#usage) target script(s) with `data-cover` html-attribute

Client-side JS code coverage using [PhantomJS](https://github.com/ariya/phantomjs), [Mocha](https://mochajs.org/) and [Blanket](https://github.com/alex-seville/blanket):

- [Configure](https://mochajs.org/#running-mocha-in-the-browser) Mocha for browser
- [Mark](https://github.com/deepsweet/poncho#usage) target script(s) with `data-cover` HTML attribute
- Run your tests with a command like this:

```sh
./node_modules/.bin/poncho -R lcov test/test.html | ./node_modules/coveralls/bin/coveralls.js
```
```sh
./node_modules/.bin/poncho -R lcov test/test.html | ./node_modules/coveralls/bin/coveralls.js
```

### [Lab](https://github.com/hapijs/lab)

```sh
lab -r lcov | ./node_modules/.bin/coveralls
```

### [nyc](https://github.com/bcoe/nyc)
### [nyc](https://github.com/istanbuljs/nyc)

works with almost any testing framework. Simply execute
Works with almost any testing framework. Simply execute
`npm test` with the `nyc` bin followed by running its reporter:

```
```shell
nyc npm test && nyc report --reporter=text-lcov | coveralls
```

### [TAP](https://github.com/isaacs/node-tap)
### [TAP](https://github.com/tapjs/node-tap)

Simply run your tap tests with the `COVERALLS_REPO_TOKEN` environment
variable set and tap will automatically use `nyc` to report
coverage to coveralls.

### Command Line Parameters

```shell
Usage: coveralls.js [-v] filepath
```

#### Optional arguments:

-v, --verbose

filepath - optionally defines the base filepath of your source files.
- `-v`, `--verbose`
- `filepath` - optionally defines the base filepath of your source files.

## Running locally

If you're running locally, you must have a `.coveralls.yml` file, as documented in [their documentation](https://coveralls.io/docs/ruby), with your `repo_token` in it; or, you must provide a `COVERALLS_REPO_TOKEN` environment-variable on the command-line.
If you're running locally, you must have a `.coveralls.yml` file, as documented in [their documentation](https://docs.coveralls.io/ruby-on-rails#configuration), with your `repo_token` in it; or, you must provide a `COVERALLS_REPO_TOKEN` environment variable on the command-line.

If you want to send commit data to coveralls, you can set the `COVERALLS_GIT_COMMIT` environment-variable to the commit hash you wish to reference. If you don't want to use a hash, you can set it to `HEAD` to supply coveralls with the latest commit data. This requires git to be installed and executable on the current PATH.

[travis-image]: https://travis-ci.org/nickmerwin/node-coveralls.svg?branch=master
[travis-url]: https://travis-ci.org/nickmerwin/node-coveralls
## Contributing

[codeship-image]: https://www.codeship.io/projects/de6fb440-dea9-0130-e7d9-122ca7ee39d3/status
[codeship-url]: https://www.codeship.io/projects/5622
I generally don't accept pull requests that are untested or break the build, because I'd like to keep the quality high (this is a coverage tool after all!).

[coveralls-image]: https://coveralls.io/repos/nickmerwin/node-coveralls/badge.svg?branch=master&service=github
[coveralls-url]: https://coveralls.io/github/nickmerwin/node-coveralls?branch=master
I also don't care for "soft-versioning" or "optimistic versioning" (dependencies that have ^, x, > in them, or anything other than numbers and dots). There have been too many problems with bad semantic versioning in dependencies, and I'd rather have a solid library than a bleeding-edge one.

## Contributing

I generally don't accept pull requests that are untested, or break the build, because I'd like to keep the quality high (this is a coverage tool afterall!).
[ci-image]: https://github.com/nickmerwin/node-coveralls/workflows/Tests/badge.svg
[ci-url]: https://github.com/nickmerwin/node-coveralls/actions?workflow=Tests

I also don't care for "soft-versioning" or "optimistic versioning" (dependencies that have ^, x, > in them, or anything other than numbers and dots). There have been too many problems with bad semantic versioning in dependencies, and I'd rather have a solid library than a bleeding edge one.
[coveralls-image]: https://coveralls.io/repos/nickmerwin/node-coveralls/badge.svg?branch=master&service=github
[coveralls-url]: https://coveralls.io/github/nickmerwin/node-coveralls?branch=master