mirror of
https://github.com/jwinterm/modoboa.git
synced 2026-10-18 05:51:26 +02:00
46 lines
1.1 KiB
YAML
46 lines
1.1 KiB
YAML
sudo: false
|
|
language: python
|
|
python:
|
|
- "2.7"
|
|
addons:
|
|
apt:
|
|
packages:
|
|
- ldap-utils
|
|
- postfix
|
|
- slapd
|
|
|
|
env:
|
|
- DB="POSTGRESQL"
|
|
- DB="MYSQL"
|
|
|
|
services:
|
|
- mysql
|
|
- postgres
|
|
|
|
before_install:
|
|
- pip install codecov
|
|
|
|
install:
|
|
- python setup.py -q develop
|
|
- pip install -q psycopg2 mysqlclient
|
|
- pip install -q -r ldap-requirements.txt
|
|
- pip install -q -r test-requirements.txt
|
|
|
|
before_script:
|
|
- psql -c 'create database modoboa_test;' -U postgres
|
|
- mysql -e "create database IF NOT EXISTS modoboa_test;" -uroot
|
|
- mysql -e "CREATE USER 'modoboa'@'localhost' IDENTIFIED BY 'modoboa'" -uroot;
|
|
- mysql -e "GRANT ALL PRIVILEGES ON * . * TO 'modoboa'@'localhost';" -uroot;
|
|
- 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.admin.tests modoboa.limits modoboa.relaydomains
|
|
|
|
after_success:
|
|
- codecov
|