From dbe7dd2a54681b7f7c8051fbe61566f5adf51e20 Mon Sep 17 00:00:00 2001 From: Chris Williams Date: Mon, 10 Sep 2018 10:42:38 -0700 Subject: [PATCH] =?UTF-8?q?[monorepo]=20add=20travis=20+=20codecov=20?= =?UTF-8?q?=E2=9C=85=20(#3)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * [monorepo] initial attempt at travis * [monorepo] coveralls => codecov * [monorepo] don't lerna bootstrap? * [monorepo] ignore lock files, add lint:fix script * [core] add node-fetch dev dep * [monorepo] tweak codecov call * [monorepo] tweak codecov call take ii * [monorepo] codecov again * [core][deps] build-config@^0.0.11 * [core][jest] add to coveragePathIgnorePatterns paths * [core][jest] add collectCoverageFrom config * [core][jest] try adding rootDir to collectCoverageFrom glob * [core][deps] build-config@0.0.12 * [travis] yolo * [travis] this is the one * [travis] install global codecov * [travis] no quotes in yml * [travis] no quotes in yml part 2 --- .../superset-ui/.gitignore | 2 ++ .../superset-ui/.travis.yml | 27 +++++++++++++++++++ .../superset-ui/package.json | 1 + .../packages/superset-ui-core/package.json | 14 +++++----- 4 files changed, 36 insertions(+), 8 deletions(-) create mode 100644 superset-frontend/temporary_superset_ui/superset-ui/.travis.yml diff --git a/superset-frontend/temporary_superset_ui/superset-ui/.gitignore b/superset-frontend/temporary_superset_ui/superset-ui/.gitignore index 4ff18fba27841..454dd0e0cee39 100644 --- a/superset-frontend/temporary_superset_ui/superset-ui/.gitignore +++ b/superset-frontend/temporary_superset_ui/superset-ui/.gitignore @@ -18,4 +18,6 @@ jest.config.js lib/ logs/ node_modules/ +package-lock.json prettier.config.js +yarn.lock diff --git a/superset-frontend/temporary_superset_ui/superset-ui/.travis.yml b/superset-frontend/temporary_superset_ui/superset-ui/.travis.yml new file mode 100644 index 0000000000000..8cc212a062fb4 --- /dev/null +++ b/superset-frontend/temporary_superset_ui/superset-ui/.travis.yml @@ -0,0 +1,27 @@ +language: node_js + +node_js: + - 10.7 + +cache: + directories: + - node_modules + +matrix: + fast_finish: true + +install: + - npm install + - npm install -g codecov + +env: + - PACKAGE=superset-ui-core + +script: + - cd ./packages/$PACKAGE + - yarn install + - yarn run lint + - yarn run test + +after_script: + - codecov diff --git a/superset-frontend/temporary_superset_ui/superset-ui/package.json b/superset-frontend/temporary_superset_ui/superset-ui/package.json index 3b89af1d43180..ce2a19355177e 100644 --- a/superset-frontend/temporary_superset_ui/superset-ui/package.json +++ b/superset-frontend/temporary_superset_ui/superset-ui/package.json @@ -7,6 +7,7 @@ "build": "lerna run build", "jest": "lerna run test", "lint": "lerna run lint", + "lint:fix": "lerna run lint:fix", "prerelease": "yarn run build", "prepare-release": "git checkout master && git pull --rebase origin master && yarn run test", "release": "yarn run prepare-release && lerna publish && lerna run gh-pages", diff --git a/superset-frontend/temporary_superset_ui/superset-ui/packages/superset-ui-core/package.json b/superset-frontend/temporary_superset_ui/superset-ui/packages/superset-ui-core/package.json index 222ed9c0120a4..0aa8bca951f84 100644 --- a/superset-frontend/temporary_superset_ui/superset-ui/packages/superset-ui-core/package.json +++ b/superset-frontend/temporary_superset_ui/superset-ui/packages/superset-ui-core/package.json @@ -16,7 +16,8 @@ "dev": "beemo babel --watch ./src --out-dir esm/ --esm", "jest": "beemo jest --color --coverage", "eslint": "beemo eslint \"./{src,test}/**/*.{js,jsx,json,md}\"", - "lint": "yarn run prettier --write && yarn run eslint --fix", + "lint": "yarn run prettier && yarn run eslint", + "lint:fix": "yarn run prettier --write && yarn run eslint --fix", "test": "yarn run jest", "prettier": "beemo prettier \"./{src,test}/**/*.{js,jsx,json,md}\"", "sync:gitignore": "beemo sync-dotfiles --filter=gitignore", @@ -39,8 +40,9 @@ }, "homepage": "https://github.com/apache-superset/superset-ui#readme", "devDependencies": { - "@data-ui/build-config": "0.0.10", - "fetch-mock": "^6.5.2" + "@data-ui/build-config": "^0.0.12", + "fetch-mock": "^6.5.2", + "node-fetch": "^2.2.0" }, "dependencies": { "url-search-params-polyfill": "^4.0.1", @@ -64,10 +66,6 @@ "prefer-promise-reject-errors": "off" } }, - "jest": { - "testPathIgnorePatterns": [ - "node_modules" - ] - } + "jest": {} } }