71 lines
1.7 KiB
YAML
71 lines
1.7 KiB
YAML
dist: xenial
|
|
sudo: required
|
|
|
|
language: python
|
|
python:
|
|
- 2.7
|
|
cache: pip
|
|
virtualenv:
|
|
system_site_packages: true
|
|
|
|
env:
|
|
global:
|
|
- DISPLAY=:99.0
|
|
|
|
matrix:
|
|
include:
|
|
- name: Unit tests - Python 2
|
|
env: TOX_ENV=py27
|
|
- name: Unit tests - Python 3
|
|
python: 3.5
|
|
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
|
|
- name: PyGTK unit tests
|
|
env: TOX_ENV=pygtkui
|
|
- name: Plugins unit tests
|
|
env: TOX_ENV=plugins
|
|
|
|
addons:
|
|
apt:
|
|
sources:
|
|
- sourceline: "ppa:deluge-team/develop"
|
|
- deadsnakes
|
|
packages:
|
|
- python-libtorrent
|
|
- python3-libtorrent
|
|
# Install py36 specifically for pre-commit to run black formatter.
|
|
- python3.6
|
|
# Intall python3-venv to provide ensurepip module for tox.
|
|
- python3-venv
|
|
|
|
# Install dependencies
|
|
install:
|
|
- pip install tox tox-venv
|
|
- "if [ $TOX_ENV == 'pygtkui' ]; then
|
|
sudo apt install python-glade2;
|
|
fi"
|
|
- "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"
|
|
|
|
before_script:
|
|
- export PYTHONPATH=$PYTHONPATH:$PWD
|
|
- python -c "import libtorrent as lt; print(lt.__version__)"
|
|
# Start xvfb for the GTKUI tests
|
|
- "if [ $TOX_ENV == 'pygtkui' ]; then
|
|
/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
|
|
|
|
script:
|
|
- tox -e $TOX_ENV
|