Files
modoboa/.travis.yml
T
Antoine NguyenandGitHub 3df446f657 Moving back the stats module to the core. (#2011)
* Moving back the stats module to the core.

* Added system packages to build RRDtool.

* Fixed unit tests.

* Improved coverage.
2020-09-17 16:02:39 +02:00

78 lines
1.7 KiB
YAML

language: python
python:
- '3.5'
- '3.6'
- '3.7'
- '3.8'
env:
global:
- PYTHONWARNINGS="default,ignore::PendingDeprecationWarning,ignore::ResourceWarning"
matrix:
- DB="POSTGRESQL"
- DB="MYSQL"
sudo: false
addons:
postgresql: '9.6'
mysql: '5.5'
apt:
packages:
- ldap-utils
- postfix
- slapd
- librrd-dev
- rrdtool
cache: pip
services:
- postgres
- mysql
- redis-server
before_install:
- pip install codecov
install:
- pip install -r requirements.txt
- pip install -r ldap-requirements.txt
- pip install -r test-requirements.txt
- if [ $DB = POSTGRESQL ]; then pip install -r postgresql-requirements.txt ; fi
- if [ $DB = MYSQL ]; then pip install -r mysql-requirements.txt ; fi
- python setup.py develop
before_script:
- mkdir /tmp/slapd
- slapd -f test_data/slapd.conf -h ldap://localhost:3389 &
- sleep 3
- ldapadd -h localhost:3389 -D cn=admin,dc=example,dc=com -w test -f test_data/base.ldif
script:
- python ./tests.py
- cd test_project
- coverage run manage.py test modoboa.core modoboa.lib modoboa.admin modoboa.limits modoboa.transport modoboa.relaydomains modoboa.dnstools modoboa.ldapsync modoboa.policyd modoboa.maillog
after_success:
- coverage combine
- coverage report
- codecov
before_deploy:
- cd ../modoboa
- django-admin compilemessages
- cd ..
deploy:
provider: pypi
user: tonio
password:
secure: SKFrH4cri56YQziqMZ4uvbh5Vto9YrQuBlYRnO9BwcjXbcp6jMpZ+9j+aytMdvcN+xG5of6DmgSIiZsLCOl4LDoPn2oPwWMzZA9T8knSVYt9v1uiBTwDmssIt9QH3wD/o3edpTsSoKw+O2cTT2GaE75+3aTK01+CX4ZsUtkGbTk=
skip_cleanup: true
distributions: sdist bdist_wheel
on:
tags: true
python: '3.8'
condition: "$DB = POSTGRESQL"