From 6ea406daf467bbb30b75e45d3eea933ce202367e Mon Sep 17 00:00:00 2001 From: Josep M Sobrepere Date: Tue, 21 Jul 2020 13:41:01 +0200 Subject: [PATCH] chore(ci): fix CI --- .travis.yml | 2 +- package.json | 24 ++++++++++++++++++++++-- packages/core/package.json | 16 +++------------- packages/dom/package.json | 16 +++------------- packages/utils/package.json | 16 +++------------- yarn.lock | 8 ++++---- 6 files changed, 36 insertions(+), 46 deletions(-) diff --git a/.travis.yml b/.travis.yml index 62a0cbb..dd7b2ec 100644 --- a/.travis.yml +++ b/.travis.yml @@ -2,4 +2,4 @@ language: node_js node_js: node cache: yarn script: - - yarn build:ci && yarn test:ci + - yarn ci diff --git a/package.json b/package.json index c359796..5b3d783 100644 --- a/package.json +++ b/package.json @@ -4,11 +4,30 @@ "workspaces": [ "packages/*" ], + "bundlesize": [ + { + "path": "./packages/core/dist/core.cjs.production.min.js", + "maxSize": "4 kB", + "compression": "none" + }, + { + "path": "./packages/dom/dist/dom.cjs.production.min.js", + "maxSize": "1 kB", + "compression": "none" + }, + { + "path": "./packages/utils/dist/utils.cjs.production.min.js", + "maxSize": "4 kB", + "compression": "none" + } + + ], "scripts": { - "build:ci": "wsrun build:ci", "build": "wsrun build", + "build:ci": "yarn build && bundlesize", "lint": "wsrun lint", - "test:ci": "cross-env CI=true wsrun test:ci" + "test:ci": "cross-env CI=true wsrun test:ci", + "ci": "yarn build:ci && yarn test:ci" }, "prettier": { "printWidth": 80, @@ -16,6 +35,7 @@ "trailingComma": "all" }, "devDependencies": { + "bundlesize": "^0.18.0", "cross-env": "^7.0.2", "prettier": "^2.0.5", "typescript": "^3.9.7", diff --git a/packages/core/package.json b/packages/core/package.json index 3d0e864..a82247a 100644 --- a/packages/core/package.json +++ b/packages/core/package.json @@ -1,12 +1,5 @@ { "version": "0.1.0-alpha.0", - "bundlesize": [ - { - "path": "./dist/core.cjs.production.min.js", - "maxSize": "5 kB", - "compression": "none" - } - ], "sideEffects": false, "repository": { "type": "git", @@ -21,10 +14,8 @@ "scripts": { "start": "tsdx watch", "build": "tsdx build", - "build:ci": "yarn build && bundlesize", - "coverage": "codecov", - "test": "tsdx test --passWithNoTests --coverage", - "test:ci": "yarn test && yarn coverage", + "test": "tsdx test --coverage", + "test:ci": "cross-env CI=true tsdx test --coverage && codecov --disable=gcov", "lint": "tsdx lint", "prepare": "tsdx build" }, @@ -51,8 +42,7 @@ "@types/jest": "^26.0.5", "@types/react": "^16.9.43", "@types/react-dom": "^16.9.8", - "bundlesize": "^0.18.0", - "codecov": "^3.7.1", + "codecov": "3.7.0", "husky": "^4.2.5", "jest-marbles": "^2.5.1", "react": "^16.13.1", diff --git a/packages/dom/package.json b/packages/dom/package.json index 8dffe55..ab0fc63 100644 --- a/packages/dom/package.json +++ b/packages/dom/package.json @@ -1,12 +1,5 @@ { "version": "0.1.0-alpha.0", - "bundlesize": [ - { - "path": "./dist/dom.cjs.production.min.js", - "maxSize": "1 kB", - "compression": "none" - } - ], "sideEffects": false, "repository": { "type": "git", @@ -21,10 +14,8 @@ "scripts": { "start": "tsdx watch", "build": "tsdx build", - "build:ci": "yarn build && bundlesize", - "coverage": "codecov", - "test": "tsdx test --passWithNoTests --coverage", - "test:ci": "yarn test && yarn coverage", + "test": "tsdx test --coverage", + "test:ci": "cross-env CI=true tsdx test --coverage && codecov --disable=gcov", "lint": "tsdx lint", "prepare": "tsdx build" }, @@ -53,8 +44,7 @@ "@types/jest": "^26.0.5", "@types/react": "^16.9.43", "@types/react-dom": "^16.9.8", - "bundlesize": "^0.18.0", - "codecov": "^3.7.1", + "codecov": "3.7.0", "husky": "^4.2.5", "jest-marbles": "^2.5.1", "react": "^16.13.1", diff --git a/packages/utils/package.json b/packages/utils/package.json index 9ace24f..5ce9918 100644 --- a/packages/utils/package.json +++ b/packages/utils/package.json @@ -1,12 +1,5 @@ { "version": "0.1.0-alpha.0", - "bundlesize": [ - { - "path": "./dist/utils.cjs.production.min.js", - "maxSize": "5 kB", - "compression": "none" - } - ], "sideEffects": false, "repository": { "type": "git", @@ -21,10 +14,8 @@ "scripts": { "start": "tsdx watch", "build": "tsdx build", - "build:ci": "yarn build && bundlesize", - "coverage": "codecov", - "test": "tsdx test --passWithNoTests --coverage", - "test:ci": "yarn test && yarn coverage", + "test": "tsdx test --coverage", + "test:ci": "cross-env CI=true tsdx test --coverage && codecov --disable=gcov", "lint": "tsdx lint", "prepare": "tsdx build" }, @@ -51,8 +42,7 @@ "@types/jest": "^26.0.5", "@types/react": "^16.9.43", "@types/react-dom": "^16.9.8", - "bundlesize": "^0.18.0", - "codecov": "^3.7.1", + "codecov": "3.7.0", "husky": "^4.2.5", "jest-marbles": "^2.5.1", "react": "^16.13.1", diff --git a/yarn.lock b/yarn.lock index 47ab48d..3a093be 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2072,10 +2072,10 @@ code-point-at@^1.0.0: resolved "https://registry.yarnpkg.com/code-point-at/-/code-point-at-1.1.0.tgz#0d070b4d043a5bea33a2f1a40e2edb3d9a4ccf77" integrity sha1-DQcLTQQ6W+ozovGkDi7bPZpMz3c= -codecov@^3.7.1: - version "3.7.1" - resolved "https://registry.yarnpkg.com/codecov/-/codecov-3.7.1.tgz#434cb8d55f18ef01672e5739d3d266696bebc202" - integrity sha512-JHWxyPTkMLLJn9SmKJnwAnvY09kg2Os2+Ux+GG7LwZ9g8gzDDISpIN5wAsH1UBaafA/yGcd3KofMaorE8qd6Lw== +codecov@3.7.0: + version "3.7.0" + resolved "https://registry.yarnpkg.com/codecov/-/codecov-3.7.0.tgz#4a09939cde24447a43f36d068e8b4e0188dc3f27" + integrity sha512-uIixKofG099NbUDyzRk1HdGtaG8O+PBUAg3wfmjwXw2+ek+PZp+puRvbTohqrVfuudaezivJHFgTtSC3M8MXww== dependencies: argv "0.0.2" ignore-walk "3.0.3"