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

chore: add code coverage #29

Merged
merged 1 commit into from
Feb 8, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,10 @@ install_and_test: &install_and_test
- run:
name: Test
command: npm test
- run:
name: Submit coverage data to codecov.
command: npm run codecov
when: always

jobs:
test_node4:
Expand Down
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,5 @@ node_modules
build
.vscode
package-lock.json
.nyc_output
coverage
5 changes: 5 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
# gcp-metadata
> Get the metadata from a Google Cloud Platform environment

[![codecov][codecov-image]][codecov-url]

```sh
$ npm install --save gcp-metadata
```
Expand Down Expand Up @@ -28,3 +30,6 @@ const res = await gcpMetadata.instance({
});
console.log(res.data) // ...Tags as newline-delimited list
```

[codecov-image]: https://codecov.io/gh/stephenplusplus/gcp-metadata/branch/master/graph/badge.svg
[codecov-url]: https://codecov.io/gh/stephenplusplus/gcp-metadata
5 changes: 4 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,8 @@
"pretest": "npm run compile",
"posttest": "npm run check",
"prepare": "npm run compile",
"test": "ava build/test"
"test": "nyc ava build/test",
"codecov": "nyc report --reporter=json && codecov -f coverage/*.json"
},
"keywords": [
"google cloud platform",
Expand All @@ -42,8 +43,10 @@
"@types/nock": "^9.1.2",
"@types/node": "^8.0.31",
"ava": "^0.25.0",
"codecov": "^3.0.0",
"gts": "^0.5.1",
"nock": "^9.1.6",
"nyc": "^11.4.1",
"typescript": "^2.5.3"
},
"engines": {
Expand Down