Add coverage reporting with coveralls (#1459)
This commit is contained in:
parent
acd1610083
commit
8b051c13a2
|
@ -25,7 +25,7 @@ jobs:
|
|||
- stage: test
|
||||
script: npm run prettier:diff
|
||||
- stage: test
|
||||
script: npm run test
|
||||
script: npm run test:coverage -- --maxWorkers=2 && npm run report-coverage
|
||||
- stage: test
|
||||
script: npm run tslint && npm run tscheck && npm run freezer && npm run freezer:validate
|
||||
|
||||
|
|
|
@ -19,5 +19,6 @@
|
|||
],
|
||||
"automock": false,
|
||||
"snapshotSerializers": ["enzyme-to-json/serializer"],
|
||||
"browser": true
|
||||
"browser": true,
|
||||
"collectCoverage": true
|
||||
}
|
||||
|
|
|
@ -18,5 +18,6 @@
|
|||
],
|
||||
"automock": false,
|
||||
"snapshotSerializers": ["enzyme-to-json/serializer"],
|
||||
"browser": true
|
||||
"browser": true,
|
||||
"collectCoverage": true
|
||||
}
|
||||
|
|
35
package.json
35
package.json
|
@ -1,4 +1,3 @@
|
|||
|
||||
{
|
||||
"name": "MyCrypto",
|
||||
"author": "MyCryptoHQ",
|
||||
|
@ -80,6 +79,7 @@
|
|||
"check-node-version": "3.2.0",
|
||||
"concurrently": "3.5.1",
|
||||
"copy-webpack-plugin": "4.5.1",
|
||||
"coveralls": "3.0.0",
|
||||
"css-loader": "0.28.11",
|
||||
"electron": "1.8.4",
|
||||
"electron-builder": "20.8.1",
|
||||
|
@ -142,42 +142,33 @@
|
|||
"prebuild": "check-node-version --package",
|
||||
"build:downloadable": "webpack --mode=production --config webpack_config/webpack.html.js",
|
||||
"prebuild:downloadable": "check-node-version --package",
|
||||
"build:electron":
|
||||
"webpack --config webpack_config/webpack.electron-prod.js && node webpack_config/buildElectron.js",
|
||||
"build:electron:osx":
|
||||
"webpack --config webpack_config/webpack.electron-prod.js && ELECTRON_OS=osx node webpack_config/buildElectron.js",
|
||||
"build:electron:windows":
|
||||
"webpack --config webpack_config/webpack.electron-prod.js && ELECTRON_OS=windows node webpack_config/buildElectron.js",
|
||||
"build:electron:linux":
|
||||
"webpack --config webpack_config/webpack.electron-prod.js && ELECTRON_OS=linux node webpack_config/buildElectron.js",
|
||||
"build:electron": "webpack --config webpack_config/webpack.electron-prod.js && node webpack_config/buildElectron.js",
|
||||
"build:electron:osx": "webpack --config webpack_config/webpack.electron-prod.js && ELECTRON_OS=osx node webpack_config/buildElectron.js",
|
||||
"build:electron:windows": "webpack --config webpack_config/webpack.electron-prod.js && ELECTRON_OS=windows node webpack_config/buildElectron.js",
|
||||
"build:electron:linux": "webpack --config webpack_config/webpack.electron-prod.js && ELECTRON_OS=linux node webpack_config/buildElectron.js",
|
||||
"prebuild:electron": "check-node-version --package",
|
||||
"jenkins:build:linux":
|
||||
"webpack --config webpack_config/webpack.electron-prod.js && ELECTRON_OS=JENKINS_LINUX node webpack_config/buildElectron.js",
|
||||
"jenkins:build:mac":
|
||||
"webpack --config webpack_config/webpack.electron-prod.js && ELECTRON_OS=JENKINS_MAC node webpack_config/buildElectron.js",
|
||||
"jenkins:build:linux": "webpack --config webpack_config/webpack.electron-prod.js && ELECTRON_OS=JENKINS_LINUX node webpack_config/buildElectron.js",
|
||||
"jenkins:build:mac": "webpack --config webpack_config/webpack.electron-prod.js && ELECTRON_OS=JENKINS_MAC node webpack_config/buildElectron.js",
|
||||
"jenkins:upload": "node jenkins/upload",
|
||||
"test:coverage": "jest --config=jest_config/jest.config.json --coverage",
|
||||
"test": "jest --config=jest_config/jest.config.json",
|
||||
"test:unit": "jest --config=jest_config/jest.config.json --coverage",
|
||||
"test:int": "jest --config=jest_config/jest.int.config.json --coverage",
|
||||
"report-coverage": " cat ./coverage/lcov.info | coveralls",
|
||||
"updateSnapshot": "jest --config=jest_config/jest.config.json --updateSnapshot",
|
||||
"pretest": "check-node-version --package",
|
||||
"dev": "node webpack_config/devServer.js",
|
||||
"predev": "check-node-version --package",
|
||||
"dev:https": "HTTPS=true node webpack_config/devServer.js",
|
||||
"predev:https": "check-node-version --package",
|
||||
"dev:electron":
|
||||
"concurrently --kill-others --names 'webpack,electron' 'BUILD_ELECTRON=true node webpack_config/devServer.js' 'webpack --config webpack_config/webpack.electron-dev.js && electron dist/electron-js/main.js'",
|
||||
"dev:electron:https":
|
||||
"concurrently --kill-others --names 'webpack,electron' 'BUILD_ELECTRON=true HTTPS=true node webpack_config/devServer.js' 'HTTPS=true webpack --config webpack_config/webpack.electron-dev.js && electron dist/electron-js/main.js'",
|
||||
"dev:electron": "concurrently --kill-others --names 'webpack,electron' 'BUILD_ELECTRON=true node webpack_config/devServer.js' 'webpack --config webpack_config/webpack.electron-dev.js && electron dist/electron-js/main.js'",
|
||||
"dev:electron:https": "concurrently --kill-others --names 'webpack,electron' 'BUILD_ELECTRON=true HTTPS=true node webpack_config/devServer.js' 'HTTPS=true webpack --config webpack_config/webpack.electron-dev.js && electron dist/electron-js/main.js'",
|
||||
"tslint": "tslint --project . --exclude common/vendor/**/*",
|
||||
"tscheck": "tsc --noEmit",
|
||||
"start": "npm run dev",
|
||||
"precommit": "lint-staged",
|
||||
"formatAll":
|
||||
"find ./common/ -name '*.ts*' | xargs prettier --write --config ./.prettierrc --config-precedence file-override",
|
||||
"prettier:diff":
|
||||
"prettier --write --config ./.prettierrc --list-different \"common/**/*.ts\" \"common/**/*.tsx\"",
|
||||
"formatAll": "find ./common/ -name '*.ts*' | xargs prettier --write --config ./.prettierrc --config-precedence file-override",
|
||||
"prettier:diff": "prettier --write --config ./.prettierrc --list-different \"common/**/*.ts\" \"common/**/*.tsx\"",
|
||||
"prepush": "npm run tslint && npm run tscheck"
|
||||
},
|
||||
"lint-staged": {
|
||||
|
@ -193,4 +184,4 @@
|
|||
"common/libs/decrypt.ts",
|
||||
"common/libs/signing.ts"
|
||||
]
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue