Skip to content

Commit ca2ee9d

Browse files
authored
Merge pull request #122 from maxmind/andy/fix-snyk-token
Only run snyk when SNYK_TOKEN is in the env
2 parents 51b503c + 09a12a9 commit ca2ee9d

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

.travis.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,9 +20,9 @@ matrix:
2020
before_install:
2121
- composer install --dev -n --prefer-source
2222
- phpenv rehash
23-
- "if [[ $RUN_SNYK ]]; then sudo apt-get install -y nodejs; npm install -g snyk; fi"
23+
- "if [[ $RUN_SNYK && $SNYK_TOKEN ]]; then sudo apt-get install -y nodejs; npm install -g snyk; fi"
2424
install:
25-
- "if [[ $RUN_SNYK ]]; then snyk test --org=maxmind; fi"
25+
- "if [[ $RUN_SNYK && $SNYK_TOKEN ]]; then snyk test --org=maxmind; fi"
2626
script:
2727
- mkdir -p build/logs
2828
- "if [[ $RUN_LINTER ]]; then vendor/bin/php-cs-fixer fix --verbose --diff --dry-run --config=.php_cs; fi"
@@ -31,7 +31,7 @@ script:
3131
after_script:
3232
- php vendor/bin/coveralls
3333
after_success:
34-
- "if [[ $RUN_SNYK && $TRAVIS_BRANCH == 'master' && $TRAVIS_PULL_REQUEST == 'false' ]]; then snyk monitor --org=maxmind --project-name=maxmind/GeoIP2-php; fi"
34+
- "if [[ $RUN_SNYK && $SNYK_TOKEN && $TRAVIS_BRANCH == 'master' && $TRAVIS_PULL_REQUEST == 'false' ]]; then snyk monitor --org=maxmind --project-name=maxmind/GeoIP2-php; fi"
3535
notifications:
3636
email:
3737
on_failure: always

0 commit comments

Comments
 (0)