Skip to content

Commit

Permalink
Chore: test-security in separete ci job
Browse files Browse the repository at this point in the history
  • Loading branch information
pustovitDmytro committed Oct 11, 2021
1 parent 14597ff commit a4bd846
Show file tree
Hide file tree
Showing 2 changed files with 36 additions and 7 deletions.
39 changes: 34 additions & 5 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,22 @@ cache-defaults: &cache-defaults
- -{{ checksum "package-lock.json" }}

parameters:
env-tests:
skip-fossa:
type: boolean
default: false
skip-coveralls:
type: boolean
default: false
skip-security:
type: boolean
default: false
skip-leaks:
type: boolean
default: false
skip-deploy:
type: boolean
default: false
skip-danger:
type: boolean
default: false

Expand Down Expand Up @@ -48,6 +63,9 @@ aliases:
- &security
name: Validate dependencies
command: npm run test:security
- &security-all
name: Validate dev-dependencies
command: npm audit
- &install
name: Installing Dependencies
command: npm ci
Expand Down Expand Up @@ -79,6 +97,18 @@ jobs:
- run: *danger-pr
- run: *fossa-analize
- save_cache: *cache-modules
test-security:
<<: *defaults
steps:
- checkout
- when:
condition:
not: << pipeline.parameters.skip-security >>
steps:
- restore_cache:
<<: *cache-defaults
- run: *security
- run: *security-all
test-coverage:
<<: *defaults
steps:
Expand Down Expand Up @@ -149,6 +179,9 @@ workflows:
jobs:
- install:
context: branches
- test-security:
requires:
- install
- test-package:
requires:
- install
Expand Down Expand Up @@ -183,7 +216,3 @@ workflows:
filters:
branches:
only: /pull\/[0-9]+/
env-tests:
when: << pipeline.parameters.env-tests >>
jobs:
- install
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@
"scripts": {
"prepare": "babel src --out-dir ./lib --copy-files && husky install",
"coveralls": "cat ./reports/coverage/lcov.info | coveralls",
"test:security": "npm audit && npm run test:lock",
"test:security": "npm audit --production && npm run test:lock",
"test:lint": "eslint src bin tests --no-error-on-unmatched-pattern",
"test:mocha": "mocha --config .mocharc.json 'tests/**/*test.js'",
"test:mocha": "mocha --config .mocharc.json 'tests/**/*test.js'",
"test:package": "npt test -c .package-tester.json",
"test:coverage": "BUILD=0 MODE=test nyc mocha --config .mocharc.json 'tests/**/*test.js'",
"test:debt": "jscpd src --config .jscpd.json",
Expand Down

0 comments on commit a4bd846

Please sign in to comment.