deluge/.travis.yml
Calum Lind 6973f96f8c [Tests] Update tox and CI configs
- Add new requirements files to make it easier to install deps.

- Tox changes
  - Update tox to use new requirements files.
  - Tweak heading styles.
  - Add development environment command `devenv`.
  - Remove testenv command as it would run on devenv creation.

- Travis changes
  - Now uses xenial as trusty is very old now.
  - Trial run disabled to speed up tests.
  - Add tox-venv for Python 3 support.
  - Only install testssl if running security tests.

- Appveyor
  - Add tox-venv for Python 3 support.
  - Use requirements file for non-tox.
  - Remove trial run to speed up testing.
2018-10-05 13:23:45 +01:00

58 lines
1.6 KiB
YAML

dist: xenial
sudo: required
language: python
python:
- "2.7"
cache: pip
before_install:
- lsb_release -a
- sudo add-apt-repository ppa:deluge-team/develop -yu
# command to install dependencies
install:
- bash -c "echo $APTPACKAGES"
- sudo apt install $APTPACKAGES
- pip install tox tox-venv
# the next part is for the security tests only.
- "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"
env:
global:
- APTPACKAGES="python-libtorrent"
- APTPACKAGES_GTKUI="python-glade2"
- DISPLAY=:99.0
matrix:
include:
- env: TOX_ENV=pydef
- if: commit_message =~ SECURITY_TEST
env: TOX_ENV=security
- env: TOX_ENV=flake8
#- env: TOX_ENV=flake8-complexity
- env: TOX_ENV=docs
#- env: TOX_ENV=todo
#- env: TOX_ENV=trial APTPACKAGES="$APTPACKAGES $APTPACKAGES_GTKUI"
- env: TOX_ENV=pygtkui APTPACKAGES="$APTPACKAGES $APTPACKAGES_GTKUI"
#- env: TOX_ENV=testcoverage APTPACKAGES="$APTPACKAGES $APTPACKAGES_GTKUI"
- env: TOX_ENV=plugins
virtualenv:
system_site_packages: true
# We use xvfb for the GTKUI tests
before_script:
- export PYTHONPATH=$PYTHONPATH:$PWD
- python -c "import libtorrent as lt; print lt.__version__"
- "/sbin/start-stop-daemon --start --quiet --pidfile /tmp/custom_xvfb_99.pid --make-pidfile --background --exec /usr/bin/Xvfb -- :99 -ac -screen 0 1280x1024x16"
- echo '2.0.0.dev0' > RELEASE-VERSION
script:
- bash -c "echo $DISPLAY"
- tox -e $TOX_ENV