Add nsp scanning after lint step
- Also separate lint from test npm script and call separately in CircleCI Issue #34
This commit is contained in:
Родитель
d1c88be4ca
Коммит
2593746676
|
@ -1,23 +1,24 @@
|
|||
version: 2
|
||||
jobs:
|
||||
test:
|
||||
docker:
|
||||
- image: circleci/node:8.11.1@sha256:0ac63bc3d5a224deac83654a322a995332809c9f535434dfd195c26e7310ec3e
|
||||
working_directory: ~/repo
|
||||
steps:
|
||||
- checkout
|
||||
- restore_cache:
|
||||
keys:
|
||||
- v1-dependencies-{{ checksum "package.json" }}
|
||||
- v1-dependencies-
|
||||
- run: npm install
|
||||
- save_cache:
|
||||
paths:
|
||||
- node_modules
|
||||
key: v1-dependencies-{{ checksum "package.json" }}
|
||||
- run: npm test
|
||||
workflows:
|
||||
version: 2
|
||||
test:
|
||||
jobs:
|
||||
- test
|
||||
version: 2
|
||||
jobs:
|
||||
test:
|
||||
docker:
|
||||
- image: circleci/node:8.11.1@sha256:0ac63bc3d5a224deac83654a322a995332809c9f535434dfd195c26e7310ec3e
|
||||
working_directory: ~/repo
|
||||
steps:
|
||||
- checkout
|
||||
- restore_cache:
|
||||
keys:
|
||||
- v1-dependencies-{{ checksum "package.json" }}
|
||||
- v1-dependencies-
|
||||
- run: npm install
|
||||
- save_cache:
|
||||
paths:
|
||||
- node_modules
|
||||
key: v1-dependencies-{{ checksum "package.json" }}
|
||||
- run: npm run lint
|
||||
- run: npm test
|
||||
workflows:
|
||||
version: 2
|
||||
test:
|
||||
jobs:
|
||||
- test
|
||||
|
|
Разница между файлами не показана из-за своего большого размера
Загрузить разницу
13
package.json
13
package.json
|
@ -4,13 +4,17 @@
|
|||
"description": "Rate limiting proxy for watchdog requests",
|
||||
"scripts": {
|
||||
"deploy": "serverless deploy",
|
||||
"lint": "eslint functions lib test",
|
||||
"lint": "npm-run-all lint:*",
|
||||
"lint:js": "eslint functions lib test",
|
||||
"logs": "serverless logs",
|
||||
"postlint": "nsp check -o summary",
|
||||
"nsp": "nsp check",
|
||||
"remove": "serverless remove",
|
||||
"test": "npm-run-all lint test:js",
|
||||
"test": "npm-run-all test:*",
|
||||
"test:js": "mocha --recursive test",
|
||||
"watch": "onchange -v -i \"{functions,lib,test}/**/*.js\" -- npm run test",
|
||||
"watch:deploy": "onchange -v \"functions/*.js\" \"lib/*.js\" -- npm run deploy"
|
||||
"watch": "npm-run-all --parallel watch:*",
|
||||
"watch:lint": "onchange -v -i \"{functions,lib,test}/**/*.js\" -- npm run lint",
|
||||
"watch:test": "onchange -v -i \"{functions,lib,test}/**/*.js\" -- npm run test"
|
||||
},
|
||||
"homepage": "https://github.com/mozilla/watchdog-proxy/",
|
||||
"repository": {
|
||||
|
@ -27,6 +31,7 @@
|
|||
"eslint-plugin-no-unsanitized": "3.0.0",
|
||||
"mocha": "5.1.1",
|
||||
"npm-run-all": "4.1.3",
|
||||
"nsp": "3.2.1",
|
||||
"onchange": "4.0.0",
|
||||
"serverless": "1.27.2",
|
||||
"serverless-s3-remover": "0.4.1",
|
||||
|
|
Загрузка…
Ссылка в новой задаче