From 7b8db6f03f8f4f8e0ff9196d91e9e145b3f0090a Mon Sep 17 00:00:00 2001 From: cexbrayat Date: Mon, 28 May 2018 14:16:12 +0200 Subject: [PATCH] chore: add codecov --- .codecov.yml | 2 ++ .travis.yml | 3 +++ README.md | 1 + package.json | 36 +++++++++++++++++++----------------- yarn.lock | 41 +++++++++++++++++++++++++++++++++++++++++ 5 files changed, 66 insertions(+), 17 deletions(-) create mode 100644 .codecov.yml diff --git a/.codecov.yml b/.codecov.yml new file mode 100644 index 00000000..cb62b239 --- /dev/null +++ b/.codecov.yml @@ -0,0 +1,2 @@ +codecov: + comment: false diff --git a/.travis.yml b/.travis.yml index fff80243..516b0214 100644 --- a/.travis.yml +++ b/.travis.yml @@ -8,3 +8,6 @@ script: - yarn build - yarn test - yarn doc +after_success: +# upload js coverage to codecov.io +- npm run codecov diff --git a/README.md b/README.md index 627573ba..350246d7 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,5 @@ [![Build Status](https://travis-ci.org/Ninja-Squad/ngx-speculoos.svg?branch=master)](https://travis-ci.org/Ninja-Squad/ngx-speculoos) +[![Codecov](https://codecov.io/gh/Ninja-Squad/ngx-speculoos/branch/master/graph/badge.svg)](https://codecov.io/gh/Ninja-Squad/ngx-speculoos) # ngx-speculoos diff --git a/package.json b/package.json index 4684503b..330c5f29 100644 --- a/package.json +++ b/package.json @@ -4,35 +4,32 @@ "scripts": { "ng": "ng", "build": "ng build --prod", - "test": "ng test --no-progress --no-watch", + "test": "ng test --no-progress --no-watch --code-coverage", "lint": "ng lint", "release": "cd projects/ngx-speculoos && standard-version --infile ../../CHANGELOG.md", - "doc": "node scripts/prepare-doc.js && cd projects/ngx-speculoos && compodoc" + "doc": "node scripts/prepare-doc.js && cd projects/ngx-speculoos && compodoc", + "codecov": "codecov" }, "private": true, "devDependencies": { + "@angular-devkit/build-angular": "~0.6.3", + "@angular-devkit/build-ng-packagr": "~0.6.3", + "@angular/cli": "~6.0.3", "@angular/common": "^6.0.2", - "@angular/core": "^6.0.2", "@angular/compiler": "^6.0.2", + "@angular/compiler-cli": "^6.0.2", + "@angular/core": "^6.0.2", + "@angular/language-service": "^6.0.2", "@angular/platform-browser": "^6.0.2", "@angular/platform-browser-dynamic": "^6.0.2", "@angular/router": "^6.0.2", - "core-js": "^2.5.4", - "rxjs": "^6.0.0", - "zone.js": "^0.8.26", - "@angular/compiler-cli": "^6.0.2", - "@angular-devkit/build-ng-packagr": "~0.6.3", - "@angular-devkit/build-angular": "~0.6.3", - "ng-packagr": "^3.0.0-rc.2", - "tsickle": ">=0.25.5", - "tslib": "^1.7.1", - "typescript": "~2.7.2", - "@angular/cli": "~6.0.3", - "@angular/language-service": "^6.0.2", + "@compodoc/compodoc": "^1.1.3", "@types/jasmine": "~2.8.6", "@types/jasminewd2": "~2.0.3", "@types/node": "~8.9.4", + "codecov": "3.0.2", "codelyzer": "~4.2.1", + "core-js": "^2.5.4", "jasmine-core": "~2.99.1", "jasmine-spec-reporter": "~4.2.1", "karma": "~1.7.1", @@ -40,9 +37,14 @@ "karma-coverage-istanbul-reporter": "~1.4.2", "karma-jasmine": "~1.1.1", "karma-jasmine-html-reporter": "^0.2.2", + "ng-packagr": "^3.0.0-rc.2", + "rxjs": "^6.0.0", + "standard-version": "^4.3.0", "ts-node": "~5.0.1", + "tsickle": ">=0.25.5", + "tslib": "^1.7.1", "tslint": "~5.9.1", - "@compodoc/compodoc": "^1.1.3", - "standard-version": "^4.3.0" + "typescript": "~2.7.2", + "zone.js": "^0.8.26" } } diff --git a/yarn.lock b/yarn.lock index c902573f..98573f32 100644 --- a/yarn.lock +++ b/yarn.lock @@ -580,6 +580,10 @@ argparse@^1.0.7: dependencies: sprintf-js "~1.0.2" +argv@0.0.2: + version "0.0.2" + resolved "https://registry.yarnpkg.com/argv/-/argv-0.0.2.tgz#ecbd16f8949b157183711b1bda334f37840185ab" + arr-diff@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/arr-diff/-/arr-diff-2.0.0.tgz#8f3b827f955a8bd669697e4a4256ac3ceae356cf" @@ -1382,6 +1386,14 @@ code-point-at@^1.0.0: version "1.1.0" resolved "https://registry.yarnpkg.com/code-point-at/-/code-point-at-1.1.0.tgz#0d070b4d043a5bea33a2f1a40e2edb3d9a4ccf77" +codecov@3.0.2: + version "3.0.2" + resolved "https://registry.yarnpkg.com/codecov/-/codecov-3.0.2.tgz#aea43843a5cd2fb6b7e488b2eff25d367ab70b12" + dependencies: + argv "0.0.2" + request "^2.81.0" + urlgrey "0.4.4" + codelyzer@~4.2.1: version "4.2.1" resolved "https://registry.yarnpkg.com/codelyzer/-/codelyzer-4.2.1.tgz#d56eaacefca7e8138aac0a630e484bdb09988544" @@ -5885,6 +5897,31 @@ request@2, request@^2.74.0, request@^2.83.0: tunnel-agent "^0.6.0" uuid "^3.1.0" +request@^2.81.0: + version "2.87.0" + resolved "https://registry.yarnpkg.com/request/-/request-2.87.0.tgz#32f00235cd08d482b4d0d68db93a829c0ed5756e" + dependencies: + aws-sign2 "~0.7.0" + aws4 "^1.6.0" + caseless "~0.12.0" + combined-stream "~1.0.5" + extend "~3.0.1" + forever-agent "~0.6.1" + form-data "~2.3.1" + har-validator "~5.0.3" + http-signature "~1.2.0" + is-typedarray "~1.0.0" + isstream "~0.1.2" + json-stringify-safe "~5.0.1" + mime-types "~2.1.17" + oauth-sign "~0.8.2" + performance-now "^2.1.0" + qs "~6.5.1" + safe-buffer "^5.1.1" + tough-cookie "~2.3.3" + tunnel-agent "^0.6.0" + uuid "^3.1.0" + request@~2.79.0: version "2.79.0" resolved "https://registry.yarnpkg.com/request/-/request-2.79.0.tgz#4dfe5bf6be8b8cdc37fcf93e04b65577722710de" @@ -7201,6 +7238,10 @@ url@^0.11.0: punycode "1.3.2" querystring "0.2.0" +urlgrey@0.4.4: + version "0.4.4" + resolved "https://registry.yarnpkg.com/urlgrey/-/urlgrey-0.4.4.tgz#892fe95960805e85519f1cd4389f2cb4cbb7652f" + use@^3.1.0: version "3.1.0" resolved "https://registry.yarnpkg.com/use/-/use-3.1.0.tgz#14716bf03fdfefd03040aef58d8b4b85f3a7c544"