Skip to content
Permalink
Browse files

Only run snyk when SNYK_TOKEN is in the env

  • Loading branch information...
andyjack committed Oct 11, 2018
1 parent 51b503c commit 09a12a94e6621563cd05f7f52dc89c248a3621cc
Showing with 3 additions and 3 deletions.
  1. +3 −3 .travis.yml
@@ -20,9 +20,9 @@ matrix:
before_install:
- composer install --dev -n --prefer-source
- phpenv rehash
- "if [[ $RUN_SNYK ]]; then sudo apt-get install -y nodejs; npm install -g snyk; fi"
- "if [[ $RUN_SNYK && $SNYK_TOKEN ]]; then sudo apt-get install -y nodejs; npm install -g snyk; fi"
install:
- "if [[ $RUN_SNYK ]]; then snyk test --org=maxmind; fi"
- "if [[ $RUN_SNYK && $SNYK_TOKEN ]]; then snyk test --org=maxmind; fi"
script:
- mkdir -p build/logs
- "if [[ $RUN_LINTER ]]; then vendor/bin/php-cs-fixer fix --verbose --diff --dry-run --config=.php_cs; fi"
@@ -31,7 +31,7 @@ script:
after_script:
- php vendor/bin/coveralls
after_success:
- "if [[ $RUN_SNYK && $TRAVIS_BRANCH == 'master' && $TRAVIS_PULL_REQUEST == 'false' ]]; then snyk monitor --org=maxmind --project-name=maxmind/GeoIP2-php; fi"
- "if [[ $RUN_SNYK && $SNYK_TOKEN && $TRAVIS_BRANCH == 'master' && $TRAVIS_PULL_REQUEST == 'false' ]]; then snyk monitor --org=maxmind --project-name=maxmind/GeoIP2-php; fi"
notifications:
email:
on_failure: always

0 comments on commit 09a12a9

Please sign in to comment.
You can’t perform that action at this time.