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-25 14:02:53 +00:00
|
|
|
- 3.5
|
2016-05-21 17:53:40 +00:00
|
|
|
cache: pip
|
2018-10-10 13:49:39 +00:00
|
|
|
virtualenv:
|
|
|
|
system_site_packages: true
|
|
|
|
|
|
|
|
env:
|
|
|
|
global:
|
|
|
|
- DISPLAY=:99.0
|
2016-05-21 17:53:40 +00:00
|
|
|
|
2018-10-10 13:49:39 +00:00
|
|
|
matrix:
|
|
|
|
include:
|
|
|
|
- name: Unit tests - Python 2
|
|
|
|
env: TOX_ENV=py27
|
2018-10-25 14:02:53 +00:00
|
|
|
python: 2.7
|
2018-10-10 13:49:39 +00:00
|
|
|
- name: Unit tests - Python 3
|
|
|
|
env: TOX_ENV=py3
|
|
|
|
- if: commit_message =~ SECURITY_TEST
|
|
|
|
env: TOX_ENV=security
|
|
|
|
- name: Code linting
|
|
|
|
env: TOX_ENV=lint
|
|
|
|
- name: Docs build
|
|
|
|
env: TOX_ENV=docs
|
2018-10-25 14:02:53 +00:00
|
|
|
python: 2.7
|
|
|
|
- name: GTK unit tests
|
|
|
|
env: TOX_ENV=gtkui
|
2018-10-10 13:49:39 +00:00
|
|
|
- name: Plugins unit tests
|
|
|
|
env: TOX_ENV=plugins
|
2014-09-21 14:37:29 +00:00
|
|
|
|
2018-10-05 14:33:26 +00:00
|
|
|
addons:
|
|
|
|
apt:
|
|
|
|
sources:
|
2018-10-10 13:49:39 +00:00
|
|
|
- sourceline: "ppa:deluge-team/develop"
|
2018-10-05 14:33:26 +00:00
|
|
|
- deadsnakes
|
|
|
|
packages:
|
2018-10-10 13:49:39 +00:00
|
|
|
- python-libtorrent
|
|
|
|
- python3-libtorrent
|
|
|
|
# Install py36 specifically for pre-commit to run black formatter.
|
2018-10-05 14:33:26 +00:00
|
|
|
- python3.6
|
2018-10-10 13:49:39 +00:00
|
|
|
# Intall python3-venv to provide ensurepip module for tox.
|
2018-10-08 15:05:40 +00:00
|
|
|
- python3-venv
|
2018-10-05 14:33:26 +00:00
|
|
|
|
2018-10-10 13:49:39 +00:00
|
|
|
# Install dependencies
|
2014-10-13 14:57:46 +00:00
|
|
|
install:
|
2018-10-03 15:12:29 +00:00
|
|
|
- pip install tox tox-venv
|
2018-10-25 14:02:53 +00:00
|
|
|
- "if [ $TOX_ENV == 'gtkui' ]; then
|
|
|
|
sudo apt install python-gi python-gi-cairo python3-gi python3-gi-cairo \
|
|
|
|
gir1.2-gtk-3.0;
|
2018-10-10 13:49:39 +00:00
|
|
|
fi"
|
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
|
|
|
|
|
|
|
before_script:
|
|
|
|
- export PYTHONPATH=$PYTHONPATH:$PWD
|
2018-10-08 15:05:40 +00:00
|
|
|
- python -c "import libtorrent as lt; print(lt.__version__)"
|
2018-10-10 13:49:39 +00:00
|
|
|
# Start xvfb for the GTKUI tests
|
2018-10-25 14:02:53 +00:00
|
|
|
- "if [ $TOX_ENV == 'gtkui' ]; then
|
2018-10-10 13:49:39 +00:00
|
|
|
/sbin/start-stop-daemon --start --quiet --background \
|
|
|
|
--make-pidfile --pidfile /tmp/custom_xvfb_99.pid \
|
|
|
|
--exec /usr/bin/Xvfb -- :99 -ac -screen 0 1280x1024x16;
|
|
|
|
fi"
|
|
|
|
- echo "2.0.0.dev0" > RELEASE-VERSION
|
2014-09-21 14:37:29 +00:00
|
|
|
|
|
|
|
script:
|
|
|
|
- tox -e $TOX_ENV
|