Skip to content

Commit e3997c0

Browse files
committed
Run snyk checks on requirements, but only for python 2.7
- snyk needs to check requirements.txt, so add one, but be warned it isn't actually used as part of installing this project's dependencies; see setup.py - setup.py needs ipaddress for all python 2.x and python <3.3, but we're only testing 3.x for versions 3.3 or greater. Therefore only check 2.7 since we'd expect the same snyk result for all python 2.x versions.
1 parent 08fd056 commit e3997c0

File tree

2 files changed

+16
-1
lines changed

2 files changed

+16
-1
lines changed

.travis.yml

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,15 @@ before_install:
2323
- pip install coverage coveralls
2424
- if [[ $TRAVIS_PYTHON_VERSION == '3.6' ]]; then pip install pylint yapf; fi
2525
- if [[ $TRAVIS_PYTHON_VERSION == '2.6' ]]; then pip install unittest2; fi
26+
- |
27+
if [[ $TRAVIS_PYTHON_VERSION == '2.7' ]]; then
28+
sudo apt-get install -y nodejs;
29+
npm install -g snyk;
30+
pip install -r requirements.txt;
31+
fi
32+
33+
install:
34+
- if [[ $TRAVIS_PYTHON_VERSION == '2.7' ]]; then snyk test --org=maxmind; fi
2635

2736
script:
2837
- if [[ $TRAVIS_PYTHON_VERSION != 'pypy' ]]; then export MM_FORCE_EXT_TESTS=1; fi
@@ -32,6 +41,7 @@ script:
3241

3342
after_success:
3443
- coveralls
44+
- if [[ $TRAVIS_BRANCH == 'master' && $TRAVIS_PULL_REQUEST == 'false' && $TRAVIS_PYTHON_VERSION == '2.7' ]]; then snyk monitor --org=maxmind --project=maxmind/MaxMind-DB-Reader-python; fi
3545

3646
notifications:
3747
email:
@@ -42,7 +52,8 @@ notifications:
4252

4353
env:
4454
global:
45-
- secure: "pVcpV/al5Q607TbRzl/sbkdsx5hUjxehaJm6t5tgWrFn45icwdZrPw3JWcpt0R57NhPvXHxcJdm4WBtcGElWoDtR52QOW3yYh+gRw23y1MJg+5qHIbh5R1sOC/fLJ9TzQzvvRH5QQ5bKIe1hRQW9Cpqm7nX5Zhq6SqnAzcG1emE="
55+
- secure: "pVcpV/al5Q607TbRzl/sbkdsx5hUjxehaJm6t5tgWrFn45icwdZrPw3JWcpt0R57NhPvXHxcJdm4WBtcGElWoDtR52QOW3yYh+gRw23y1MJg+5qHIbh5R1sOC/fLJ9TzQzvvRH5QQ5bKIe1hRQW9Cpqm7nX5Zhq6SqnAzcG1emE="
56+
- secure: "idzTTvCWmC0TYgYxQFOaZju86TUzKLaMKs2ZZsGloklf0mk0d3XH/CD5VYDPgP++/7Kmw9zC401EZyRC6anZYB0qCXwRulgux2Io5HCWChIrZTSx3DoSl+VRVi0cUkfMNomrwduJ0g1vVnDXp6xM8ITE574jwpasUJ2MOvVykdU="
4657

4758
addons:
4859
coverity_scan:

requirements.txt

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
# NOTE: This project does not use requirements.txt, it uses setup.py.
2+
# This file is only present to support dependency checks in CI for certain
3+
# python versions.
4+
ipaddress

0 commit comments

Comments
 (0)