Permalink
Fetching contributors…
Cannot retrieve contributors at this time
76 lines (63 sloc) 1.66 KB
language: python
python:
- '2.7'
- '3.4'
- '3.5'
- '3.6'
env:
global:
- PYTHONWARNINGS="default,ignore::PendingDeprecationWarning,ignore::ResourceWarning"
matrix:
- DB="POSTGRESQL"
- DB="MYSQL"
sudo: false
addons:
postgresql: '9.3'
mysql: '5.5'
apt:
packages:
- ldap-utils
- postfix
- slapd
cache: pip
services:
- postgres
- mysql
before_install:
- pip install codecov
- pip install codacy-coverage
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 --source ../modoboa manage.py test modoboa.core modoboa.lib modoboa.admin modoboa.limits modoboa.transport modoboa.relaydomains
after_success:
- coverage xml
- codecov
- python-codacy-coverage -r coverage.xml
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.6'
condition: "$DB = POSTGRESQL"