summaryrefslogtreecommitdiffstats
path: root/.travis.yml
diff options
context:
space:
mode:
authorCalum Lind <calumlind@gmail.com>2018-10-25 15:02:53 +0100
committerCalum Lind <calumlind@gmail.com>2018-11-02 08:47:57 +0000
commit97e7d95dd3cf9e922db147d49f23c931ad692c31 (patch)
treeda132daaf6c8e569aa9d525a7b81a9049173ebf3 /.travis.yml
parent26c28445a5f89fe883aa6becae3e87d71ed3f589 (diff)
downloaddeluge-97e7d95dd3cf9e922db147d49f23c931ad692c31.tar.gz
deluge-97e7d95dd3cf9e922db147d49f23c931ad692c31.tar.bz2
deluge-97e7d95dd3cf9e922db147d49f23c931ad692c31.zip
Cleanup tox configuration
There were issues with dependencies and tox environments under Python 3 so refactored the tox configuration to be more consistent and clearer. - Moved travis to default to Python 3 for linting and tests. - Fixed missing mock for cairo in sphinx config. - Collated the base deps sections to improve readability. - Added PYTEST_ADDOPTS env to override pytest verbosity in just tox tests as this was a common option being used. - Renamed env 'testcoverage' to the more concise 'coverage' and moved html creation under single env as handy to have this output as well as report. - Cleaned up the isort config for gtk3. - Added `bad-continuation` to pylint config as conflcts with black formatting. - Fix isort issue with bbfreeze script. This will likely be removed in future so just skip sorting it.
Diffstat (limited to '.travis.yml')
-rw-r--r--.travis.yml16
1 files changed, 9 insertions, 7 deletions
diff --git a/.travis.yml b/.travis.yml
index 30da3e24e..0b5f11450 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -3,7 +3,7 @@ sudo: required
language: python
python:
- - 2.7
+ - 3.5
cache: pip
virtualenv:
system_site_packages: true
@@ -16,8 +16,8 @@ matrix:
include:
- name: Unit tests - Python 2
env: TOX_ENV=py27
+ python: 2.7
- name: Unit tests - Python 3
- python: 3.5
env: TOX_ENV=py3
- if: commit_message =~ SECURITY_TEST
env: TOX_ENV=security
@@ -25,8 +25,9 @@ matrix:
env: TOX_ENV=lint
- name: Docs build
env: TOX_ENV=docs
- - name: PyGTK unit tests
- env: TOX_ENV=pygtkui
+ python: 2.7
+ - name: GTK unit tests
+ env: TOX_ENV=gtkui
- name: Plugins unit tests
env: TOX_ENV=plugins
@@ -46,8 +47,9 @@ addons:
# Install dependencies
install:
- pip install tox tox-venv
- - "if [ $TOX_ENV == 'pygtkui' ]; then
- sudo apt install python-gi python-gi-cairo gir1.2-gtk-3.0;
+ - "if [ $TOX_ENV == 'gtkui' ]; then
+ sudo apt install python-gi python-gi-cairo python3-gi python3-gi-cairo \
+ gir1.2-gtk-3.0;
fi"
- "if [ $TOX_ENV == 'security' ]; then
testssl_url=https://github.com/drwetter/testssl.sh/archive/v2.9.5-5.tar.gz;
@@ -59,7 +61,7 @@ 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
+ - "if [ $TOX_ENV == 'gtkui' ]; 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;