codacy-coverage
Advanced tools
Comparing version 2.1.0 to 2.1.1
@@ -17,3 +17,4 @@ (function (logger, exec, Promise) { | ||
process.env.CI_COMMIT_ID || | ||
process.env.WERCKER_GIT_COMMIT; | ||
process.env.WERCKER_GIT_COMMIT || | ||
process.env.BUILDKITE_COMMIT; | ||
@@ -20,0 +21,0 @@ if (gitCommit) { |
{ | ||
"name": "codacy-coverage", | ||
"version": "2.1.0", | ||
"version": "2.1.1", | ||
"description": "Code Coverage reporter for Codacy.com", | ||
@@ -5,0 +5,0 @@ "keywords": [ |
@@ -31,3 +31,3 @@ # Node Codacy Coverage | ||
To send coverage in the enterprise version you should specify your Codacy installation URL: | ||
To send coverage in the enterprise version you should specify your Codacy installation URL with the option `-e`: | ||
@@ -44,10 +44,15 @@ ```sh | ||
You'll need to provide the Report token from Codacy via an environment variable: | ||
### Identifying the project | ||
* CODACY_PROJECT_TOKEN (the secret repo token from Codacy.com) | ||
You'll need to provide the secret Project API token from `Codacy Project > Settings > Integrations > Project API` via: | ||
> Note: You should keep your API token well **protected**, as it grants owner permissions to your projects. | ||
* (Recommended) Environment variable: CODACY_PROJECT_TOKEN | ||
* CLI parameter variable: `--token` | ||
### [Mocha](http://mochajs.org) + [Blanket.js](https://github.com/alex-seville/blanket) | ||
> Note: You should keep your any API token well **protected**, as it grants owner permissions to your projects. | ||
### Test Coverage | ||
#### [Mocha](http://mochajs.org) + [Blanket.js](https://github.com/alex-seville/blanket) | ||
* Install [blanket.js](http://blanketjs.org/) | ||
@@ -69,3 +74,3 @@ * Configure blanket according to [docs](https://github.com/alex-seville/blanket/blob/master/docs/getting_started_node.md). | ||
### [Mocha](http://mochajs.org) + [JSCoverage](https://github.com/fishbar/jscoverage) | ||
#### [Mocha](http://mochajs.org) + [JSCoverage](https://github.com/fishbar/jscoverage) | ||
@@ -88,5 +93,5 @@ 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. | ||
### [Istanbul](https://github.com/gotwarlost/istanbul) | ||
#### [Istanbul](https://github.com/gotwarlost/istanbul) | ||
#### With Mocha | ||
##### With Mocha | ||
@@ -107,3 +112,3 @@ * Add test with coverage step to your package.json: | ||
#### With Jasmine | ||
##### With Jasmine | ||
@@ -124,3 +129,3 @@ * Add test with coverage step to your package.json: | ||
### [Poncho](https://github.com/deepsweet/poncho) | ||
#### [Poncho](https://github.com/deepsweet/poncho) | ||
@@ -145,3 +150,3 @@ Client-side JS code coverage using [PhantomJS](https://github.com/ariya/phantomjs), [Mocha](http://mochajs.org) and [Blanket](https://github.com/alex-seville/blanket): | ||
### [Jest](https://facebook.github.io/jest/) | ||
#### [Jest](https://facebook.github.io/jest/) | ||
@@ -166,3 +171,3 @@ * Add test with coverage step to your package.json: | ||
To send coverage using your account/api token you can follow the following steps. | ||
As an alternative to the Project API token you can also send coverage using your account/api token by following steps: | ||
@@ -183,4 +188,7 @@ * Add test with coverage step to your package.json: | ||
As an alternative you can also export `CODACY_ACCOUNT_TOKEN` instead of passing `--accountToken <account-token>` to the CLI. | ||
You'll need to provide the secret Account API token from [Codacy Account](https://app.codacy.com/account/apiTokens)` > API Tokens` via: | ||
* (Recommended) Environment variable: CODACY_ACCOUNT_TOKEN | ||
* CLI parameter variable: `--accountToken` | ||
### Force custom language (e.g. Typescript, Coffeescript, C, ...) | ||
@@ -187,0 +195,0 @@ |
@@ -42,2 +42,6 @@ (function (util, getGitData, helper) { | ||
}); | ||
it('should be able to get the commit id from the Buildkite environment variable', function () { | ||
process.env.BUILDKITE_COMMIT = '47326'; | ||
return expect(getGitData.getCommitId()).to.eventually.equal('47326'); | ||
}); | ||
it('should be able to get the commit id from Git', function () { | ||
@@ -44,0 +48,0 @@ // If we are currently running on Travis, we should be able to use the commit id environment variable |
@@ -76,4 +76,5 @@ (function (nock, chai, Promise) { | ||
process.env.WERCKER_GIT_COMMIT = ''; | ||
process.env.BUILDKITE_COMMIT = ''; | ||
} | ||
}; | ||
}(require('nock'), require('chai'), require('bluebird'))); |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Environment variable access
Supply chain riskPackage accesses environment variables, which may be a sign of credential stuffing or data theft.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
70732
1267
240
49