ci: avoid running snyk in PR

This commit is contained in:
curbengh 2019-12-26 13:23:11 +00:00
parent 679dcaf077
commit e9609de460
No known key found for this signature in database
GPG Key ID: 21EA847C35D6E034
1 changed files with 7 additions and 10 deletions

View File

@ -14,13 +14,10 @@ script:
- npm run test - npm run test
after_script: after_script:
- npm install snyk - if ([[ $TRAVIS_EVENT_TYPE == "push" ]] || [[ $TRAVIS_EVENT_TYPE == "cron" ]]) && [[ $TRAVIS_BRANCH == "master" ]] && [[ $TRAVIS_NODE_VERSION == "12" ]]; then
- snyk auth $SNYK_TOKEN npm install snyk;
- snyk test # Check node modules for vulnerability snyk auth $SNYK_TOKEN;
- snyk protect # Patch node modules (if available) snyk test;
- snyk monitor # Update dependencies to snyk snyk protect;
snyk monitor;
branches: fi
only:
- master # Only build master branch
- /^greenkeeper.*$/ # Greenkeeper branches