-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy path.travis.yml
74 lines (72 loc) · 2.3 KB
/
.travis.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
dist: trusty
sudo: required
language: python
python:
- "3.5"
- "3.6"
cache: pip
env:
- TEST_DB=SQLite CMD=check
- TEST_DB=MySQL CMD=check
- TEST_DB=Postgres CMD=check
services:
- mysql
- postgresql
addons:
apt:
sources:
- sourceline: 'deb http://archive.ubuntu.com/ubuntu/ artful main restricted'
- sourceline: 'deb http://archive.ubuntu.com/ubuntu/ artful-updates main restricted'
packages:
# update sqlite3 to get rid of segmentation faults with Django 2.0, for example:
# https://travis-ci.org/kiwitcms/Kiwi/jobs/322848116
# all sources I've read point to possible issues with sqlite itself
- sqlite3
postgresql: 9.5
matrix:
include:
- python: 3.6
env: TEST_DB=SQLite CMD=check-docs-source-in-git
addons:
apt:
packages:
- graphviz
- python: 3.5
env: TEST_DB=MariaDB CMD=check
addons:
mariadb: 10.1
- python: 3.6
env: TEST_DB=MariaDB CMD=check
addons:
mariadb: 10.1
- python: 3.6
env: TEST_DB=SQLite CMD=check-pylint
allow_failures:
- env: TEST_DB=SQLite CMD=check-pylint
before_install:
- if [ "$TEST_DB" == "MariaDB" ]; then sudo apt-get -y install libmariadbclient-dev; fi
- cat "$TRAVIS_BUILD_DIR/.travis/my.cnf" | sudo tee -a /etc/mysql/conf.d/mariadb.cnf
- sudo cat /etc/mysql/conf.d/mariadb.cnf
- sudo service mysql restart
- mysql -e 'SELECT VERSION();'
- mysql -e 'CREATE USER "kiwi" IDENTIFIED BY "";'
- mysql -e 'CREATE DATABASE kiwi CHARACTER SET utf8 COLLATE utf8_unicode_ci;'
- mysql -e 'GRANT ALL PRIVILEGES ON kiwi.* TO kiwi;'
- mysql -e 'CREATE DATABASE test_kiwi CHARACTER SET utf8 COLLATE utf8_unicode_ci;'
- mysql -e 'GRANT ALL PRIVILEGES ON test_kiwi.* TO kiwi;'
- psql -c "CREATE DATABASE kiwi ENCODING 'UTF8' LC_COLLATE = 'en_US.UTF-8' LC_CTYPE = 'en_US.UTF-8';" -U postgres
install:
- export REQUIREMENTS_TXT="requirements/$(echo $TEST_DB | tr '[:upper:]' '[:lower:]' | sed 's/mariadb/mysql/' | sed 's/sqlite/base/').txt"
- echo "REQUIREMENTS_TXT=$REQUIREMENTS_TXT"
- pip install -r $REQUIREMENTS_TXT
- pip install -r requirements/devel.txt
- pip install coveralls codecov
- npm install
script: make $CMD
after_success:
- coveralls
- codecov
notifications:
email:
on_failure: change
on_success: never