From aa485e42c44ebccc66c6be66b1900b7bdfc7b443 Mon Sep 17 00:00:00 2001 From: Daniel Tschinder Date: Fri, 21 Apr 2017 21:01:15 +0200 Subject: [PATCH] Use bash codecov (#440) * Use bash codecov * fix windows tests --- .travis.yml | 16 ++++++++++++---- appveyor.yml | 6 +++++- package.json | 7 ++++--- yarn.lock | 41 +---------------------------------------- 4 files changed, 22 insertions(+), 48 deletions(-) diff --git a/.travis.yml b/.travis.yml index 2cd77be1..932b2410 100644 --- a/.travis.yml +++ b/.travis.yml @@ -5,12 +5,20 @@ node_js: - "6" - "4" +env: + - JOB=test + matrix: + fast_finish: true include: - node_js: "lts/*" - env: LINT=true + env: JOB=lint + +before_script: + - 'if [ "$JOB" = "test" ]; then BABEL_ENV=test yarn run build; fi' + script: - - 'if [ -n "${LINT-}" ]; then yarn lint ; fi' - - 'if [ -z "${LINT-}" ]; then yarn test-ci ; fi' + - 'if [ "$JOB" = "test" ]; then yarn test-only; fi' + - 'if [ "$JOB" = "lint" ]; then yarn run lint; fi' after_success: - - yarn coverage + - bash <(curl -s https://codecov.io/bash) -f coverage/coverage-final.json diff --git a/appveyor.yml b/appveyor.yml index 4907f099..f83ec58f 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -1,11 +1,15 @@ environment: nodejs_version: "6" + BABEL_ENV: "test" install: - ps: Install-Product node $env:nodejs_version - yarn +before_test: + - yarn run build + test_script: - - yarn test-ci + - yarn run test-only build: off diff --git a/package.json b/package.json index ec7e6dd6..af561645 100644 --- a/package.json +++ b/package.json @@ -27,7 +27,6 @@ "babel-plugin-react-intl": "^2.1.3", "babel-preset-env": "^1.2.0", "babel-register": "^6.18.0", - "codecov": "^1.0.1", "cross-env": "^4.0.0", "eslint": "^3.8.1", "eslint-config-babel": "^6.0.0", @@ -42,12 +41,10 @@ "scripts": { "clean": "rimraf lib/", "build": "babel src/ --out-dir lib/", - "coverage": "nyc report --reporter=json && codecov -f coverage/coverage-final.json", "lint": "eslint src test", "preversion": "yarn run test", "prepublish": "yarn run clean && yarn run build", "test": "yarn run lint && cross-env BABEL_ENV=test yarn run build && yarn run test-only", - "test-ci": "cross-env BABEL_ENV=test yarn run build && yarn run test-only", "test-only": "nyc ava" }, "repository": { @@ -73,6 +70,10 @@ "include": [ "src/**/*.js" ], + "reporter": [ + "text", + "json" + ], "require": [ "babel-register" ], diff --git a/yarn.lock b/yarn.lock index 0c3725af..746fdf71 100644 --- a/yarn.lock +++ b/yarn.lock @@ -150,10 +150,6 @@ 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" @@ -1224,15 +1220,6 @@ 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@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/codecov/-/codecov-1.0.1.tgz#97260ceac0e96b8eda8d562006558a53a139dffd" - dependencies: - argv ">=0.0.2" - execSync "1.0.2" - request ">=2.42.0" - urlgrey ">=0.4.0" - color-convert@^1.0.0: version "1.9.0" resolved "https://registry.yarnpkg.com/color-convert/-/color-convert-1.9.0.tgz#1accf97dd739b983bf994d56fec8f95853641b7a" @@ -1789,12 +1776,6 @@ evp_bytestokey@^1.0.0: dependencies: create-hash "^1.1.1" -execSync@1.0.2: - version "1.0.2" - resolved "https://registry.yarnpkg.com/execSync/-/execSync-1.0.2.tgz#1f42eda582225180053224ecdd3fd1960fdb3139" - dependencies: - temp "~0.5.1" - execa@^0.4.0: version "0.4.0" resolved "https://registry.yarnpkg.com/execa/-/execa-0.4.0.tgz#4eb6467a36a095fabb2970ff9d5e3fb7bce6ebc3" @@ -2114,10 +2095,6 @@ graceful-fs@^4.1.11, graceful-fs@^4.1.2, graceful-fs@^4.1.4, graceful-fs@^4.1.6: version "4.1.11" resolved "https://registry.yarnpkg.com/graceful-fs/-/graceful-fs-4.1.11.tgz#0e8bdfe4d1ddb8854d64e04ea7c00e2a026e5658" -graceful-fs@~1: - version "1.2.3" - resolved "https://registry.yarnpkg.com/graceful-fs/-/graceful-fs-1.2.3.tgz#15a4806a57547cb2d2dbf27f42e89a8c3451b364" - "graceful-readlink@>= 1.0.0": version "1.0.1" resolved "https://registry.yarnpkg.com/graceful-readlink/-/graceful-readlink-1.0.1.tgz#4cafad76bc62f02fa039b2f94e9a3dd3a391a725" @@ -3723,7 +3700,7 @@ repeating@^2.0.0: dependencies: is-finite "^1.0.0" -request@>=2.42.0, request@^2.81.0: +request@^2.81.0: version "2.81.0" resolved "https://registry.yarnpkg.com/request/-/request-2.81.0.tgz#c6928946a0e06c5f8d6f8a9333469ffda46298a0" dependencies: @@ -3815,12 +3792,6 @@ rimraf@2, rimraf@^2.2.8, rimraf@^2.3.3, rimraf@^2.4.3, rimraf@^2.4.4, rimraf@^2. dependencies: glob "^7.0.5" -rimraf@~2.1.4: - version "2.1.4" - resolved "https://registry.yarnpkg.com/rimraf/-/rimraf-2.1.4.tgz#5a6eb62eeda068f51ede50f29b3e5cd22f3d9bb2" - optionalDependencies: - graceful-fs "~1" - ripemd160@^1.0.0: version "1.0.1" resolved "https://registry.yarnpkg.com/ripemd160/-/ripemd160-1.0.1.tgz#93a4bbd4942bc574b69a8fa57c71de10ecca7d6e" @@ -4125,12 +4096,6 @@ tar@^2.2.1: fstream "^1.0.2" inherits "2" -temp@~0.5.1: - version "0.5.1" - resolved "https://registry.yarnpkg.com/temp/-/temp-0.5.1.tgz#77ab19c79aa7b593cbe4fac2441768cad987b8df" - dependencies: - rimraf "~2.1.4" - term-size@^0.1.0: version "0.1.1" resolved "https://registry.yarnpkg.com/term-size/-/term-size-0.1.1.tgz#87360b96396cab5760963714cda0d0cbeecad9ca" @@ -4300,10 +4265,6 @@ url@^0.11.0: punycode "1.3.2" querystring "0.2.0" -urlgrey@>=0.4.0: - version "0.4.4" - resolved "https://registry.yarnpkg.com/urlgrey/-/urlgrey-0.4.4.tgz#892fe95960805e85519f1cd4389f2cb4cbb7652f" - user-home@^1.1.1: version "1.1.1" resolved "https://registry.yarnpkg.com/user-home/-/user-home-1.1.1.tgz#2b5be23a32b63a7c9deb8d0f28d485724a3df190"