2018-10-03 15:12:29 +00:00
|
|
|
dist: xenial
|
2017-02-16 11:37:54 +00:00
|
|
|
sudo: required
|
|
|
|
|
2014-09-21 14:37:29 +00:00
|
|
|
language: python
|
|
|
|
python:
|
2018-10-03 10:22:22 +00:00
|
|
|
- "2.7"
|
2016-05-21 17:53:40 +00:00
|
|
|
cache: pip
|
|
|
|
|
2014-10-13 14:57:46 +00:00
|
|
|
before_install:
|
2014-09-21 14:37:29 +00:00
|
|
|
- lsb_release -a
|
2018-10-03 15:12:29 +00:00
|
|
|
- sudo add-apt-repository ppa:deluge-team/develop -yu
|
2014-09-21 14:37:29 +00:00
|
|
|
|
2018-10-05 14:33:26 +00:00
|
|
|
addons:
|
|
|
|
apt:
|
|
|
|
sources:
|
|
|
|
- deadsnakes
|
|
|
|
packages:
|
|
|
|
# Need Py 3.6 specifically for pre-commit to run black formatter.
|
|
|
|
- python3.6
|
|
|
|
|
2014-10-13 14:57:46 +00:00
|
|
|
# command to install dependencies
|
|
|
|
install:
|
|
|
|
- bash -c "echo $APTPACKAGES"
|
2018-10-03 15:12:29 +00:00
|
|
|
- sudo apt install $APTPACKAGES
|
|
|
|
- pip install tox tox-venv
|
2018-06-24 17:39:04 +00:00
|
|
|
# the next part is for the security tests only.
|
2018-10-03 15:12:29 +00:00
|
|
|
- "if [ $TOX_ENV == 'security' ]; then
|
|
|
|
testssl_url=https://github.com/drwetter/testssl.sh/archive/v2.9.5-5.tar.gz;
|
|
|
|
wget -O- $testssl_url | tar xz
|
|
|
|
&& mv -t deluge/tests/data testssl.sh-2.9.5-5/testssl.sh testssl.sh-2.9.5-5/etc/;
|
|
|
|
fi"
|
2014-09-21 14:37:29 +00:00
|
|
|
|
|
|
|
env:
|
2014-10-13 14:57:46 +00:00
|
|
|
global:
|
|
|
|
- APTPACKAGES="python-libtorrent"
|
2018-10-03 15:12:29 +00:00
|
|
|
- APTPACKAGES_GTKUI="python-glade2"
|
2015-07-15 20:17:36 +00:00
|
|
|
- DISPLAY=:99.0
|
2018-06-24 17:39:04 +00:00
|
|
|
|
|
|
|
matrix:
|
|
|
|
include:
|
|
|
|
- env: TOX_ENV=pydef
|
|
|
|
- if: commit_message =~ SECURITY_TEST
|
|
|
|
env: TOX_ENV=security
|
2018-10-05 14:33:26 +00:00
|
|
|
- env: TOX_ENV=lint
|
2018-06-24 17:39:04 +00:00
|
|
|
- env: TOX_ENV=docs
|
|
|
|
- env: TOX_ENV=pygtkui APTPACKAGES="$APTPACKAGES $APTPACKAGES_GTKUI"
|
|
|
|
- env: TOX_ENV=plugins
|
2014-09-21 14:37:29 +00:00
|
|
|
|
|
|
|
virtualenv:
|
|
|
|
system_site_packages: true
|
|
|
|
|
2014-10-13 14:57:46 +00:00
|
|
|
# We use xvfb for the GTKUI tests
|
2014-09-21 14:37:29 +00:00
|
|
|
before_script:
|
|
|
|
- export PYTHONPATH=$PYTHONPATH:$PWD
|
2016-10-17 11:40:28 +00:00
|
|
|
- python -c "import libtorrent as lt; print lt.__version__"
|
2015-07-15 20:17:36 +00:00
|
|
|
- "/sbin/start-stop-daemon --start --quiet --pidfile /tmp/custom_xvfb_99.pid --make-pidfile --background --exec /usr/bin/Xvfb -- :99 -ac -screen 0 1280x1024x16"
|
2015-08-25 18:42:07 +00:00
|
|
|
- echo '2.0.0.dev0' > RELEASE-VERSION
|
2014-09-21 14:37:29 +00:00
|
|
|
|
|
|
|
script:
|
2015-07-15 20:17:36 +00:00
|
|
|
- bash -c "echo $DISPLAY"
|
2014-09-21 14:37:29 +00:00
|
|
|
- tox -e $TOX_ENV
|