Enable coverage for all other packages with tests

This commit is contained in:
Leonid Logvinov 2018-03-14 12:27:09 +01:00
parent 7fe26ee719
commit 40ebb533b3
No known key found for this signature in database
GPG Key ID: 0DD294BFDE8C95D4
14 changed files with 68 additions and 6 deletions

View File

@ -74,6 +74,10 @@ jobs:
command: npm run testrpc -- --db testrpc_snapshot
background: true
- run: yarn lerna:run --scope @0xproject/deployer test:circleci
- save_cache:
key: coverage-deployer-{{ .Environment.CIRCLE_SHA1 }}
paths:
- ~/repo/packages/deployer/coverage/lcov.info
test-rest:
docker:
- image: circleci/node:6.12
@ -87,6 +91,26 @@ jobs:
command: npm run testrpc -- --db testrpc_snapshot
background: true
- run: yarn lerna:run --ignore contracts --ignore 0x.js --ignore @0xproject/deployer test:circleci
- save_cache:
key: coverage-assert-{{ .Environment.CIRCLE_SHA1 }}
paths:
- ~/repo/packages/assert/coverage/lcov.info
- save_cache:
key: coverage-connect-{{ .Environment.CIRCLE_SHA1 }}
paths:
- ~/repo/packages/connect/coverage/lcov.info
- save_cache:
key: coverage-dev-utils-{{ .Environment.CIRCLE_SHA1 }}
paths:
- ~/repo/packages/dev-utils/coverage/lcov.info
- save_cache:
key: coverage-json-schemas-{{ .Environment.CIRCLE_SHA1 }}
paths:
- ~/repo/packages/json-schemas/coverage/lcov.info
- save_cache:
key: coverage-subproviders-{{ .Environment.CIRCLE_SHA1 }}
paths:
- ~/repo/packages/subproviders/coverage/lcov.info
lint:
working_directory: ~/repo
docker:
@ -116,6 +140,24 @@ jobs:
- restore_cache:
keys:
- coverage-contracts-{{ .Environment.CIRCLE_SHA1 }}
- restore_cache:
keys:
- coverage-assert-{{ .Environment.CIRCLE_SHA1 }}
- restore_cache:
keys:
- coverage-connect-{{ .Environment.CIRCLE_SHA1 }}
- restore_cache:
keys:
- coverage-dev-utils-{{ .Environment.CIRCLE_SHA1 }}
- restore_cache:
keys:
- coverage-json-schemas-{{ .Environment.CIRCLE_SHA1 }}
- restore_cache:
keys:
- coverage-subproviders-{{ .Environment.CIRCLE_SHA1 }}
- restore_cache:
keys:
- coverage-deployer-{{ .Environment.CIRCLE_SHA1 }}
- restore_cache:
keys:
- coverage-0xjs-{{ .Environment.CIRCLE_SHA1 }}
@ -146,4 +188,6 @@ workflows:
- submit-coverage:
requires:
- test-0xjs
- test-deployer
- test-rest
- test-contracts

View File

View File

View File

@ -12,7 +12,9 @@
"run_mocha": "mocha lib/test/**/*_test.js",
"prepublishOnly": "run-p build",
"test": "run-s clean build run_mocha",
"test:circleci": "yarn test"
"test:coverage": "nyc npm run test --all && yarn coverage:report:lcov",
"coverage:report:lcov": "nyc report --reporter=text-lcov > coverage/lcov.info",
"test:circleci": "yarn test:coverage"
},
"license": "Apache-2.0",
"repository": {
@ -29,6 +31,7 @@
"@types/lodash": "^4.14.86",
"@types/mocha": "^2.2.42",
"@types/valid-url": "^1.0.2",
"nyc": "^11.0.1",
"chai": "^4.0.1",
"chai-typescript-typings": "^0.0.4",
"copyfiles": "^1.2.0",

View File

View File

@ -21,7 +21,9 @@
"lint": "tslint --project . 'src/**/*.ts' 'test/**/*.ts'",
"run_mocha": "mocha lib/test/**/*_test.js",
"test": "run-s clean build copy_test_fixtures run_mocha",
"test:circleci": "yarn test"
"test:coverage": "nyc npm run test --all && yarn coverage:report:lcov",
"coverage:report:lcov": "nyc report --reporter=text-lcov > coverage/lcov.info",
"test:circleci": "yarn test:coverage"
},
"config": {
"postpublish": {
@ -62,6 +64,7 @@
"@types/mocha": "^2.2.42",
"@types/query-string": "^5.0.1",
"@types/websocket": "^0.0.34",
"nyc": "^11.0.1",
"async-child-process": "^1.1.1",
"chai": "^4.0.1",
"chai-as-promised": "^7.1.0",

View File

View File

@ -8,11 +8,13 @@
"build:watch": "tsc -w",
"build": "yarn clean && copyfiles 'test/fixtures/contracts/**/*' ./lib && tsc && copyfiles -u 3 './lib/src/monorepo_scripts/**/*' ./scripts",
"test": "npm run build; mocha lib/test/*_test.js",
"test:coverage": "nyc npm run test --all && yarn coverage:report:lcov",
"coverage:report:lcov": "nyc report --reporter=text-lcov > coverage/lcov.info",
"compile": "npm run build; node lib/src/cli.js compile",
"clean": "shx rm -rf lib scripts",
"migrate": "npm run build; node lib/src/cli.js migrate",
"lint": "tslint --project . 'src/**/*.ts' 'test/**/*.ts'",
"test:circleci": "yarn test"
"test:circleci": "yarn test:coverage"
},
"bin": {
"0x-deployer": "lib/src/cli.js"
@ -33,6 +35,7 @@
"@types/require-from-string": "^1.2.0",
"chai": "^4.0.1",
"copyfiles": "^1.2.0",
"nyc": "^11.0.1",
"ethers-typescript-typings": "^0.0.2",
"mocha": "^4.0.1",
"shx": "^0.2.2",

View File

View File

@ -8,8 +8,10 @@
"build:watch": "tsc -w",
"build": "tsc && copyfiles -u 3 './lib/src/monorepo_scripts/**/*' ./scripts",
"test": "run-s clean build run_mocha",
"test:circleci": "yarn test",
"test:circleci": "yarn test:coverage",
"run_mocha": "mocha lib/test/**/*_test.js --bail --exit",
"test:coverage": "nyc npm run test --all && yarn coverage:report:lcov",
"coverage:report:lcov": "nyc report --reporter=text-lcov > coverage/lcov.info",
"clean": "shx rm -rf lib scripts",
"lint": "tslint --project . 'src/**/*.ts' 'test/**/*.ts'"
},
@ -28,6 +30,7 @@
"@0xproject/web3-wrapper": "^0.2.1",
"@types/lodash": "^4.14.86",
"@types/mocha": "^2.2.42",
"nyc": "^11.0.1",
"chai": "^4.0.1",
"chai-typescript-typings": "^0.0.4",
"copyfiles": "^1.2.0",

View File

View File

@ -8,7 +8,9 @@
"build:watch": "tsc -w",
"lint": "tslint --project . 'src/**/*.ts' 'test/**/*.ts'",
"test": "run-s clean build run_mocha",
"test:circleci": "yarn test",
"test:coverage": "nyc npm run test --all && yarn coverage:report:lcov",
"coverage:report:lcov": "nyc report --reporter=text-lcov > coverage/lcov.info",
"test:circleci": "yarn test:coverage",
"run_mocha": "mocha lib/test/**/*_test.js",
"clean": "shx rm -rf _bundles lib test_temp scripts",
"build": "tsc && copyfiles -u 3 './lib/src/monorepo_scripts/**/*' ./scripts"
@ -34,6 +36,7 @@
"@types/lodash.foreach": "^4.5.3",
"@types/lodash.values": "^4.3.3",
"@types/mocha": "^2.2.42",
"nyc": "^11.0.1",
"chai": "^4.0.1",
"chai-typescript-typings": "^0.0.4",
"copyfiles": "^1.2.0",

View File

View File

@ -12,7 +12,9 @@
"run_mocha_unit": "mocha lib/test/unit/**/*_test.js --timeout 10000 --bail --exit",
"run_mocha_integration": "mocha lib/test/integration/**/*_test.js --timeout 10000 --bail --exit",
"test": "npm run test:unit",
"test:circleci": "npm run test:unit",
"test:unit:coverage": "nyc npm run test:unit --all && yarn coverage:report:lcov",
"coverage:report:lcov": "nyc report --reporter=text-lcov > coverage/lcov.info",
"test:circleci": "npm run test:unit:coverage",
"test:all": "run-s test:unit test:integration",
"test:unit": "run-s clean build run_mocha_unit",
"test:integration": "run-s clean build run_mocha_integration"
@ -42,6 +44,7 @@
"@types/lodash": "^4.14.86",
"@types/mocha": "^2.2.42",
"@types/node": "^8.0.53",
"nyc": "^11.0.1",
"chai": "^4.0.1",
"chai-as-promised": "^7.1.0",
"chai-as-promised-typescript-typings": "^0.0.10",