Skip to content

Commit 01df5d2

Browse files
authored
Merge pull request #43 from maxmind/wes/fix-snyk-token
Ensure Snyk only runs if `$SNYK_TOKEN` exists
2 parents 3b5d057 + 4d1ccf4 commit 01df5d2

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
@@ -35,21 +35,21 @@ before_install:
3535
- pip install coverage coveralls
3636
- if [[ $RUN_LINTER ]]; then pip install pylint yapf; fi
3737
- |
38-
if [[ $RUN_SNYK ]]; then
38+
if [[ $RUN_SNYK && $SNYK_TOKEN ]]; then
3939
sudo apt-get install -y nodejs;
4040
npm install -g snyk;
4141
fi
4242
4343
script:
4444
- if [[ $TRAVIS_PYTHON_VERSION != 'pypy' ]]; then export MM_FORCE_EXT_TESTS=1; fi
4545
- CFLAGS="-Werror -Wall -Wextra" coverage run --source maxminddb setup.py test
46-
- if [[ $RUN_SNYK ]]; then snyk test --org=maxmind --file=requirements.txt; fi
46+
- if [[ $RUN_SNYK && $SNYK_TOKEN ]]; then snyk test --org=maxmind --file=requirements.txt; fi
4747
- if [[ $RUN_LINTER ]]; then pylint --rcfile .pylintrc maxminddb/*.py; fi
4848
- if [[ $RUN_LINTER ]]; then ./.travis-yapf.sh; fi
4949

5050
after_success:
5151
- coveralls
52-
- if [[ $RUN_SNYK && $TRAVIS_BRANCH == 'master' && $TRAVIS_PULL_REQUEST == 'false' ]]; then snyk monitor --org=maxmind --project-name=maxmind/MaxMind-DB-Reader-python; fi
52+
- if [[ $RUN_SNYK && $SNYK_TOKEN && $TRAVIS_BRANCH == 'master' && $TRAVIS_PULL_REQUEST == 'false' ]]; then snyk monitor --org=maxmind --project-name=maxmind/MaxMind-DB-Reader-python; fi
5353

5454
notifications:
5555
email:

0 commit comments

Comments
 (0)