Skip to content

Commit

Permalink
ci: collect code coverage and publish it to codecov (aws-amplify#2474)
Browse files Browse the repository at this point in the history
* ci: collect code coverage and publish it to codecov

* updated yarn.lock and added codecov config
  • Loading branch information
yuth authored and kaustavghosh06 committed Oct 2, 2019
1 parent 84c08e7 commit 16c0630
Show file tree
Hide file tree
Showing 4 changed files with 34 additions and 6 deletions.
3 changes: 3 additions & 0 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,9 @@ jobs:
- run:
name: Run tests
command: yarn test-ci
- run:
name: Collect code coverage
command: yarn coverage
graphql_e2e_tests:
<<: *defaults
steps:
Expand Down
12 changes: 12 additions & 0 deletions codecov.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
codecov:
notify:
after_n_builds: 1

coverage:
status:
project: off
patch: off
changes:
default:
target: 80%
if_not_found: success
6 changes: 4 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,8 @@
"publish:beta": "lerna publish prerelease --exact --dist-tag=beta --preid=beta --message 'chore(release): Publish [ci skip]' --yes",
"publish:release": "lerna publish minor --exact --yes --message 'chore(release): Publish [ci skip]'",
"postpublish:release": "git fetch . release:master && git push origin master",
"commit": "git-cz"
"commit": "git-cz",
"coverage": "codecov || exit 0"
},
"bugs": {
"url": "https://github.com/aws-amplify/amplify-cli/issues"
Expand Down Expand Up @@ -53,7 +54,8 @@
"@commitlint/config-lerna-scopes": "^8.1.0",
"commitizen": "^3.1.2",
"cz-conventional-changelog": "^3.0.2",
"husky": "^3.0.3"
"husky": "^3.0.3",
"codecov": "^3.6.1"
},
"config": {
"commitizen": {
Expand Down
19 changes: 15 additions & 4 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -5578,6 +5578,17 @@ codecov@^3.0.0:
teeny-request "^3.11.3"
urlgrey "^0.4.4"

codecov@^3.6.1:
version "3.6.1"
resolved "https://registry.yarnpkg.com/codecov/-/codecov-3.6.1.tgz#f39fc49413445555f81f8e3ca5730992843b4517"
integrity sha512-IUJB6WG47nWK7o50etF8jBadxdMw7DmoQg05yIljstXFBGB6clOZsIj6iD4P82T2YaIU3qq+FFu8K9pxgkCJDQ==
dependencies:
argv "^0.0.2"
ignore-walk "^3.0.1"
js-yaml "^3.13.1"
teeny-request "^3.11.3"
urlgrey "^0.4.4"

codemirror-graphql@^0.8.3:
version "0.8.3"
resolved "https://registry.yarnpkg.com/codemirror-graphql/-/codemirror-graphql-0.8.3.tgz#8de806d418f72121ccfd9820594aa306ac0d3366"
Expand Down Expand Up @@ -19525,10 +19536,10 @@ typedarray@^0.0.6:
resolved "https://registry.yarnpkg.com/typedarray/-/typedarray-0.0.6.tgz#867ac74e3864187b1d3d47d996a78ec5c8830777"
integrity sha1-hnrHTjhkGHsdPUfZlqeOxciDB3c=

typescript@2.8.3:
version "2.8.3"
resolved "https://registry.yarnpkg.com/typescript/-/typescript-2.8.3.tgz#5d817f9b6f31bb871835f4edf0089f21abe6c170"
integrity sha512-K7g15Bb6Ra4lKf7Iq2l/I5/En+hLIHmxWZGq3D4DIRNFxMNV6j2SHSvDOqs2tGd4UvD/fJvrwopzQXjLrT7Itw==
typescript@3.5.3:
version "3.5.3"
resolved "https://registry.yarnpkg.com/typescript/-/typescript-3.5.3.tgz#c830f657f93f1ea846819e929092f5fe5983e977"
integrity sha512-ACzBtm/PhXBDId6a6sDJfroT2pOWt/oOnk4/dElG5G33ZL776N3Y6/6bKZJBFpd+b05F3Ct9qDjMeJmRWtE2/g==

typescript@^2.9.2:
version "2.9.2"
Expand Down

0 comments on commit 16c0630

Please sign in to comment.