Files
modoboa/.travis.yml
T
Antoine NguyenandGitHub 98eea782a0 Generic transport editor. (#1309)
Generic transport editor.

see #1301

* Fixed unit test.

* Added unit tests.

* Fixed unit test.

* Added transport module to test list.

* Moved relay transport backend to appropriate app.

see #1301

* Added missing file.
2017-11-27 10:42:27 +01:00

51 lines
1.4 KiB
YAML

sudo: false
language: python
cache: pip
python:
- "2.7"
- "3.4"
- "3.6"
addons:
apt:
packages:
- ldap-utils
- postfix
- slapd
env:
- DB="POSTGRESQL"
- DB="MYSQL"
services:
- mysql
- postgres
before_install:
- pip install codecov
- if [[ $DB = 'POSTGRESQL' ]]; then pip install -q psycopg2; fi
- if [[ $DB = 'MYSQL' ]]; then pip install -q mysqlclient; fi
install:
- pip install -q -r requirements.txt
- pip install -q -r ldap-requirements.txt
- pip install -q -r test-requirements.txt
- pip install -e .
before_script:
- if [[ $DB = 'POSTGRESQL' ]]; then psql -c 'create database modoboa_test;' -U postgres; fi
- if [[ $DB = 'MYSQL' ]]; then mysql -e "create database IF NOT EXISTS modoboa_test;" -uroot; fi
- if [[ $DB = 'MYSQL' ]]; then mysql -e "CREATE USER 'modoboa'@'localhost' IDENTIFIED BY 'modoboa'" -uroot; fi
- if [[ $DB = 'MYSQL' ]]; then mysql -e "GRANT ALL PRIVILEGES ON * . * TO 'modoboa'@'localhost';" -uroot; fi
- 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:
- codecov