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
after_script:
- npm install snyk
- snyk auth $SNYK_TOKEN
- snyk test # Check node modules for vulnerability
- snyk protect # Patch node modules (if available)
- snyk monitor # Update dependencies to snyk
branches:
only:
- master # Only build master branch
- /^greenkeeper.*$/ # Greenkeeper branches
- if ([[ $TRAVIS_EVENT_TYPE == "push" ]] || [[ $TRAVIS_EVENT_TYPE == "cron" ]]) && [[ $TRAVIS_BRANCH == "master" ]] && [[ $TRAVIS_NODE_VERSION == "12" ]]; then
npm install snyk;
snyk auth $SNYK_TOKEN;
snyk test;
snyk protect;
snyk monitor;
fi