Skip to content

Commit

Permalink
chore: add code coverage (#29)
Browse files Browse the repository at this point in the history
  • Loading branch information
JustinBeckwith committed Feb 8, 2018
1 parent 1841f3c commit 5105200
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 1 deletion.
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

0 comments on commit 5105200

Please sign in to comment.