codecov.io
Advanced tools
Comparing version 0.1.0 to 0.1.1
@@ -30,5 +30,6 @@ var services = { | ||
if (token){ | ||
config.token = token; | ||
config.token = token.toLowerCase(); | ||
} | ||
config.package = 'node'; | ||
return config; | ||
}; |
@@ -12,7 +12,7 @@ module.exports = { | ||
service : 'appveyor', | ||
build : env.APPVEYOR_BUILD_NUMBER, | ||
commit : env.APPVEYOR_REPO_COMMIT, | ||
branch : env.APPVEYOR_REPO_BRANCH, | ||
owner : env.APPVEYOR_REPO_NAME.split('/')[0], | ||
repo : env.APPVEYOR_REPO_NAME.split('/')[1] | ||
job: env.APPVEYOR_BUILD_VERSION, | ||
build: env.APPVEYOR_JOB_ID, | ||
slug : env.APPVEYOR_REPO_NAME | ||
}; | ||
@@ -19,0 +19,0 @@ } |
@@ -10,3 +10,3 @@ module.exports = { | ||
if (!env) env = process.env; | ||
retval = { | ||
return { | ||
service : 'circle', | ||
@@ -16,11 +16,8 @@ build : env.CIRCLE_BUILD_NUM, | ||
branch : env.CIRCLE_BRANCH, | ||
pull_request: env.CIRCLE_PR_NUMBER, | ||
owner : env.CIRCLE_PROJECT_USERNAME, | ||
repo : env.CIRCLE_PROJECT_REPONAME, | ||
}; | ||
if (env.CIRCLE_PULL_REQUEST){ | ||
retval.pull_request = env.CIRCLE_PULL_REQUEST; | ||
} | ||
return retval; | ||
} | ||
}; |
@@ -16,4 +16,3 @@ | ||
branch : env.BRANCH_NAME, | ||
owner : env.SEMAPHORE_REPO_SLUG.split('/')[0], | ||
repo : env.SEMAPHORE_REPO_SLUG.split('/')[1] | ||
slug : env.SEMAPHORE_REPO_SLUG | ||
}; | ||
@@ -20,0 +19,0 @@ } |
@@ -12,17 +12,13 @@ | ||
if (!env) env = process.env; | ||
var config = { | ||
return { | ||
service : 'shippable', | ||
build : env.BUILD_NUMBER, | ||
build_url : env.BUILD_URL, | ||
pull_request: env.PULL_REQUEST, | ||
commit : env.COMMIT, | ||
branch : env.BRANCH, | ||
owner : env.REPO_NAME.split('/')[0], | ||
repo : env.REPO_NAME.split('/')[1] | ||
slug : env.REPO_NAME | ||
}; | ||
if (!!env.PULL_REQUEST && env.PULL_REQUEST !== 'false'){ | ||
config.pull_request = env.PULL_REQUEST; | ||
} | ||
return config; | ||
} | ||
}; |
@@ -10,17 +10,13 @@ module.exports = { | ||
if (!env) env = process.env; | ||
var config = { | ||
service : 'travis-org', | ||
return { | ||
service : 'travis', | ||
commit : env.TRAVIS_COMMIT, | ||
build : env.TRAVIS_JOB_NUMBER, | ||
branch : env.TRAVIS_BRANCH, | ||
travis_job_id : env.TRAVIS_JOB_ID, | ||
owner : env.TRAVIS_REPO_SLUG.split('/')[0], | ||
repo : env.TRAVIS_REPO_SLUG.split('/')[1] | ||
job : env.TRAVIS_JOB_ID, | ||
pull_request: env.TRAVIS_PULL_REQUEST, | ||
slug : env.TRAVIS_REPO_SLUG | ||
}; | ||
if (!!env.TRAVIS_PULL_REQUEST && env.TRAVIS_PULL_REQUEST !== 'false'){ | ||
config.pull_request = env.TRAVIS_PULL_REQUEST; | ||
} | ||
return config; | ||
} | ||
}; |
{ | ||
"name": "codecov.io", | ||
"version": "0.1.0", | ||
"version": "0.1.1", | ||
"description": "lcov posting to codecov.io", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
@@ -19,11 +19,19 @@ # codecov.io | ||
This library currently supports the following CI companies: [Travis CI](https://travis-ci.org/), [Appveyor](https://appveyor.com/), [CircleCI](https://circleci.com/), [Codeship](https://codeship.io/), [Drone](https://drone.io/), [Jenkins](http://jenkins-ci.org/), [Shippable](https://shippable.com/), [Semaphore](https://semaphoreapp.com/), [Wercker](https://wercker.com/) | ||
This library currently supports the following CI companies: [Travis CI](https://travis-ci.org/), [Appveyor](https://appveyor.com/), [CircleCI](https://circleci.com/), [Codeship](https://codeship.io/), [Drone](https://drone.io/), [Jenkins](http://jenkins-ci.org/), [Shippable](https://shippable.com/), [Semaphore](https://semaphoreapp.com/), [Wercker](https://wercker.com/). | ||
#### Upload repo tokens | ||
> Repo tokens are **not** required for public repos tested on Travis, CircleCI or AppVeyor. | ||
### [Istanbul](https://github.com/gotwarlost/istanbul) | ||
Repo tokens are neccessary to distinquish your repository from others. You can find your repo token on your repository page at Codecov. Set this unique uuid to `CODECOV_TOKEN` in your environment variables. | ||
``` | ||
export CODECOV_TOKEN=":uuid-repo-token" | ||
``` | ||
#### [Istanbul](https://github.com/gotwarlost/istanbul) | ||
**With Mocha:** | ||
```sh | ||
istanbul cover ./node_modules/mocha/bin/_mocha -- -R spec && cat ./coverage/coverage.json | ./node_modules/codecov.io/bin/codecov.io.js | ||
istanbul cover ./node_modules/mocha/bin/_mocha -- -R spec && cat ./coverage/lcov.info | ./node_modules/.bin/codecov | ||
``` | ||
@@ -34,9 +42,19 @@ | ||
```sh | ||
istanbul cover jasmine-node --captureExceptions spec/ && cat ./coverage/coverage.json | ./node_modules/codecov.io/bin/codecov.io.js | ||
istanbul cover jasmine-node --captureExceptions spec/ && cat ./coverage/lcov.info | ./node_modules/.bin/codecov | ||
``` | ||
[travis-image]: https://travis-ci.org/cainus/codecov.io.svg?branch=master | ||
[travis-url]: https://travis-ci.org/cainus/codecov.io | ||
**With Tape:** | ||
```sh | ||
istanbul cover test.js && cat ./coverage/lcov.info | ./node_modules/.bin/codecov | ||
``` | ||
---- | ||
## Advanced: Partial Line Coverage | ||
**Codecov does support parital line coverage**. However, some node projects do not report partial coverage accurate enough. | ||
You can decide to upload the partial coverage report by chaning the target upload file to `./coverage/coverage.json`. | ||
View your report on Codecov, if the reports are not accurate then switch back to the `lcov` provided above. | ||
## Contributing | ||
@@ -47,1 +65,4 @@ | ||
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. | ||
[travis-image]: https://travis-ci.org/cainus/codecov.io.svg?branch=master | ||
[travis-url]: https://travis-ci.org/cainus/codecov.io |
@@ -10,5 +10,6 @@ var getConfiguration = require("../lib/getConfiguration"); | ||
process.env.TRAVIS_JOB_NUMBER = '91011'; | ||
process.env.TRAVIS_PULL_REQUEST = 'false'; | ||
process.env.TRAVIS_BRANCH = 'master'; | ||
process.env.TRAVIS_REPO_SLUG = 'owner/repo'; | ||
process.env.CODECOV_TOKEN = 'asdf-asdf-asdf-asdf'; | ||
process.env.CODECOV_TOKEN = 'ASDF-ASDF-ASDF-ASDF'; | ||
if (process.env.TRAVIS_PULL_REQUEST) { | ||
@@ -18,10 +19,11 @@ process.env.TRAVIS_PULL_REQUEST = 'false'; | ||
expect(getConfiguration()).to.eql({ | ||
service : 'travis-org', | ||
package : 'node', | ||
service : 'travis', | ||
commit : '5678', | ||
build : '91011', | ||
branch : 'master', | ||
travis_job_id : '1234', | ||
pull_request: 'false', | ||
job : '1234', | ||
token : 'asdf-asdf-asdf-asdf', | ||
owner : 'owner', | ||
repo : 'repo' | ||
slug : 'owner/repo' | ||
}); | ||
@@ -34,2 +36,3 @@ }); | ||
process.env.TRAVIS_JOB_NUMBER = '91011'; | ||
process.env.TRAVIS_PULL_REQUEST = 'false'; | ||
process.env.TRAVIS_BRANCH = 'master'; | ||
@@ -42,10 +45,11 @@ process.env.TRAVIS_REPO_SLUG = 'owner/repo'; | ||
expect(getConfiguration()).to.eql({ | ||
service : 'travis-org', | ||
package : 'node', | ||
service : 'travis', | ||
commit : '5678', | ||
build : '91011', | ||
travis_job_id : '1234', | ||
pull_request: 'false', | ||
job : '1234', | ||
branch : 'master', | ||
token : 'asdf-asdf-asdf-asdf', | ||
owner : 'owner', | ||
repo : 'repo' | ||
slug : 'owner/repo' | ||
}); | ||
@@ -52,0 +56,0 @@ }); |
@@ -11,14 +11,15 @@ var appveyor = require("../../lib/services/appveyor"); | ||
it ("can get appveyor env info", function(){ | ||
process.env.APPVEYOR_BUILD_NUMBER = "1234"; | ||
process.env.APPVEYOR_REPO_COMMIT = "5678"; | ||
process.env.APPVEYOR_REPO_BRANCH = "master"; | ||
process.env.APPVEYOR_BUILD_VERSION = "job"; | ||
process.env.APPVEYOR_JOB_ID = "build"; | ||
process.env.APPVEYOR_REPO_NAME = 'owner/repo'; | ||
expect(appveyor.configuration()).to.eql({ | ||
service : 'appveyor', | ||
build : '1234', | ||
commit : '5678', | ||
build : '1234', | ||
build : 'build', | ||
job : 'job', | ||
branch : 'master', | ||
owner : 'owner', | ||
repo : 'repo' | ||
slug : 'owner/repo' | ||
}); | ||
@@ -25,0 +26,0 @@ }); |
@@ -10,3 +10,3 @@ var circle = require("../../lib/services/circle"); | ||
it ("can get circle env info", function(){ | ||
it ("can get circle env info get_commit_status", function(){ | ||
process.env.CIRCLECI = "true"; | ||
@@ -16,2 +16,3 @@ process.env.CIRCLE_BUILD_NUM = '1234'; | ||
process.env.CIRCLE_BRANCH = 'master'; | ||
process.env.CIRCLE_PR_NUMBER = 'blah'; | ||
process.env.CIRCLE_PROJECT_USERNAME = 'owner'; | ||
@@ -21,20 +22,3 @@ process.env.CIRCLE_PROJECT_REPONAME = 'repo'; | ||
service : 'circle', | ||
build : '1234', | ||
commit : '5678', | ||
branch : 'master', | ||
owner : 'owner', | ||
repo : 'repo' | ||
}); | ||
}); | ||
it ("can get circle env info with a pull request", function(){ | ||
process.env.CIRCLECI = "true"; | ||
process.env.CIRCLE_BUILD_NUM = '1234'; | ||
process.env.CIRCLE_SHA1 = '5678'; | ||
process.env.CIRCLE_BRANCH = 'master'; | ||
process.env.CIRCLE_PULL_REQUEST = 'blah'; | ||
process.env.CIRCLE_PROJECT_USERNAME = 'owner'; | ||
process.env.CIRCLE_PROJECT_REPONAME = 'repo'; | ||
expect(circle.configuration()).to.eql({ | ||
service : 'circle', | ||
commit : '5678', | ||
build : '1234', | ||
@@ -41,0 +25,0 @@ branch : 'master', |
@@ -20,4 +20,3 @@ var semaphore = require("../../lib/services/semaphore"); | ||
branch : 'master', | ||
owner : 'owner', | ||
repo : 'repo' | ||
slug : 'owner/repo' | ||
}); | ||
@@ -24,0 +23,0 @@ }); |
@@ -9,26 +9,5 @@ var shippable = require("../../lib/services/shippable"); | ||
}); | ||
it ("can get shippable env info", function(){ | ||
it ("can get shippable env info get_commit_status", function(){ | ||
process.env.SHIPPABLE = "true"; | ||
process.env.COMMIT = '5678'; | ||
process.env.BUILD_NUMBER = '91011'; | ||
process.env.BUILD_URL = 'http://...'; | ||
process.env.BRANCH = 'master'; | ||
process.env.REPO_NAME = 'owner/repo'; | ||
if (process.env.PULL_REQUEST) { | ||
process.env.PULL_REQUEST = 'false'; | ||
} | ||
expect(shippable.configuration()).to.eql({ | ||
service : 'shippable', | ||
commit : '5678', | ||
build : '91011', | ||
build_url : 'http://...', | ||
branch : 'master', | ||
owner : 'owner', | ||
repo : 'repo' | ||
}); | ||
}); | ||
it ("can get shippable env info with a pull request", function(){ | ||
process.env.SHIPPABLE = "true"; | ||
process.env.BUILD_URL = 'http://...'; | ||
process.env.COMMIT = '5678'; | ||
@@ -47,4 +26,3 @@ process.env.BUILD_NUMBER = '91011'; | ||
pull_request : '2', | ||
owner : 'owner', | ||
repo : 'repo' | ||
slug : 'owner/repo' | ||
}); | ||
@@ -51,0 +29,0 @@ }); |
@@ -9,4 +9,3 @@ var travis = require("../../lib/services/travis"); | ||
}); | ||
it ("can get travis env info", function(){ | ||
it ("can get travis env info get_commit_status", function(){ | ||
process.env.TRAVIS = "true"; | ||
@@ -17,33 +16,12 @@ process.env.TRAVIS_JOB_ID = '1234'; | ||
process.env.TRAVIS_BRANCH = 'master'; | ||
process.env.TRAVIS_REPO_SLUG = 'owner/repo'; | ||
if (process.env.TRAVIS_PULL_REQUEST) { | ||
process.env.TRAVIS_PULL_REQUEST = 'false'; | ||
} | ||
expect(travis.configuration()).to.eql({ | ||
service : 'travis-org', | ||
commit : '5678', | ||
build : '91011', | ||
branch : 'master', | ||
travis_job_id : '1234', | ||
owner : 'owner', | ||
repo : 'repo' | ||
}); | ||
}); | ||
it ("can get travis env info with a pull request", function(){ | ||
process.env.TRAVIS = "true"; | ||
process.env.TRAVIS_JOB_ID = '1234'; | ||
process.env.TRAVIS_COMMIT = '5678'; | ||
process.env.TRAVIS_JOB_NUMBER = '91011'; | ||
process.env.TRAVIS_BRANCH = 'master'; | ||
process.env.TRAVIS_PULL_REQUEST = 'blah'; | ||
process.env.TRAVIS_REPO_SLUG = 'owner/repo'; | ||
expect(travis.configuration()).to.eql({ | ||
service : 'travis-org', | ||
service : 'travis', | ||
commit : '5678', | ||
build : '91011', | ||
branch : 'master', | ||
travis_job_id : '1234', | ||
job : '1234', | ||
pull_request : 'blah', | ||
owner : 'owner', | ||
repo : 'repo' | ||
slug : 'owner/repo' | ||
}); | ||
@@ -50,0 +28,0 @@ }); |
Sorry, the diff of this file is not supported yet
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 3 instances 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
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
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 2 instances in 1 package
66
83
0
22744
540