Skip to content

Commit

Permalink
docs: move setup docs out of the readme [skip ci] (#1052)
Browse files Browse the repository at this point in the history
  • Loading branch information
JaKXz committed Apr 4, 2019
1 parent 8da097e commit 68d6333
Show file tree
Hide file tree
Showing 3 changed files with 70 additions and 69 deletions.
71 changes: 2 additions & 69 deletions README.md
Expand Up @@ -421,76 +421,9 @@ rather than having to ignore every instance of that method:
}
```

## Integrating with coveralls
## [Integrating with coveralls](./docs/setup-coveralls.md)

[coveralls.io](https://coveralls.io) is a great tool for adding
coverage reports to your GitHub project. Here's how to get nyc
integrated with coveralls and travis-ci.org:

1. add the coveralls and nyc dependencies to your module:

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

2. update the scripts in your package.json to include these bins:

```json
{
"scripts": {
"test": "nyc mocha",
"coverage": "nyc report --reporter=text-lcov | coveralls"
}
}
```

3. For private repos, add the environment variable `COVERALLS_REPO_TOKEN` to travis.

4. add the following to your `.travis.yml`:

```yaml
after_success: npm run coverage
```

That's all there is to it!

> Note: by default coveralls.io adds comments to pull-requests on GitHub, this can feel intrusive. To disable this, click on your repo on coveralls.io and uncheck `LEAVE COMMENTS?`.
## Integrating with codecov

`nyc npm test && nyc report --reporter=text-lcov > coverage.lcov && codecov`

[codecov](https://codecov.io/) is a great tool for adding
coverage reports to your GitHub project, even viewing them inline on GitHub with a browser extension:

Here's how to get `nyc` integrated with codecov and travis-ci.org:

1. add the codecov and nyc dependencies to your module:

```shell
npm install codecov nyc --save-dev
```

2. update the scripts in your package.json to include these bins:

```json
{
"scripts": {
"test": "nyc tap ./test/*.js",
"coverage": "nyc report --reporter=text-lcov > coverage.lcov && codecov"
}
}
```

3. For private repos, add the environment variable `CODECOV_TOKEN` to travis.

4. add the following to your `.travis.yml`:

```yaml
after_success: npm run coverage
```

That's all there is to it!
## [Integrating with codecov](./docs/setup-codecov.md)

## Integrating with TAP formatters

Expand Down
34 changes: 34 additions & 0 deletions docs/setup-codecov.md
@@ -0,0 +1,34 @@
# Integrating with codecov.io

> **tl;dr**:
> `nyc --reporter=lcov npm test && npx codecov`
[codecov](https://codecov.io/) is a great tool for adding
coverage reports to your GitHub project, even viewing them inline on GitHub with a browser extension:

Here's how to get `nyc` integrated with codecov and travis-ci.org, assuming you have the `npx` executable (included with npm v5.2 and above):

1. add the codecov and nyc dependencies to your module:

```shell
npm install nyc --save-dev
```

2. update the scripts in your package.json to include these lines:

```json
{
"scripts": {
"test": "nyc --reporter=lcov mocha ./test/*.js",
"coverage": "npx codecov"
}
}
```

3. For private repos, add the environment variable `CODECOV_TOKEN` to travis.

4. add the following to your `.travis.yml`:

```yaml
after_success: npm run coverage
```
34 changes: 34 additions & 0 deletions docs/setup-coveralls.md
@@ -0,0 +1,34 @@
# Integrating with coveralls.io

[coveralls.io](https://coveralls.io) is a great tool for adding
coverage reports to your GitHub project. Here's how to get nyc
integrated with coveralls and travis-ci.org:

1. add the coveralls and nyc dependencies to your module:

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

2. update the scripts in your package.json to include these bins:

```json
{
"scripts": {
"test": "nyc mocha",
"coverage": "nyc report --reporter=text-lcov | coveralls"
}
}
```

3. For private repos, add the environment variable `COVERALLS_REPO_TOKEN` to travis.

4. add the following to your `.travis.yml`:

```yaml
after_success: npm run coverage
```

That's all there is to it!

> Note: by default coveralls.io adds comments to pull-requests on GitHub, this can feel intrusive. To disable this, click on your repo on coveralls.io and uncheck `LEAVE COMMENTS?`.

0 comments on commit 68d6333

Please sign in to comment.