forked from WeblateOrg/weblate
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
194 lines (191 loc) · 5.1 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
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
#
# Weblate testsuite for Travis-CI
#
# - Test against all supported Django versions with postgresql
# - Test against all supported databases with current Django
# - Run Selenium tests on current Django
# - Test setup.py
#
dist: xenial
language: python
python:
- "3.7"
stages:
- name: "Static analysis"
- name: "Basic tests"
- name: "Extended tests"
# build matrix configuration
env:
global:
- DJANGO_SETTINGS_MODULE=weblate.settings_test
- CI_DATABASE=postgresql
- SAUCE_USERNAME=nijel
- CC_TEST_REPORTER_ID=b477753e9d539176556058b92f0f6594e7823ab95d1db1348f189745ea618af6
- CI_DB_HOST=127.0.0.1
before_install:
- python -c "import fcntl; fcntl.fcntl(1, fcntl.F_SETFL, 0)"
# commands to install dependencies
install:
- export TESSERACT_INSTALL=$HOME/.tesseract
- export TESSERACT_PKG=$TESSERACT_INSTALL/lib/pkgconfig
- export LD_LIBRARY_PATH=$TESSERACT_INSTALL/lib:$LD_LIBRARY_PATH
- export PKG_CONFIG_PATH=$TESSERACT_PKG:$PKG_CONFIG_PATH
- wget -O - https://github.com/nijel/tesseract-ocr-build/releases/download/3.05.02-3/tesseract.tar.xz | tar -C $HOME -xJf -
- export SAUCE_ACCESS_KEY=`echo MTBlOGE0MzItZmI0Mi00MmZhLTk5NjgtMTE4N2E3YjhlYTAy | base64 --decode`
# Get newer pip and whell for binary caching support
- pip install --upgrade pip wheel
# Install PyPI packages
- pip install $CI_DEPS Cython pycairo
- if [ -f requirements-$CI_DATABASE.txt ] ; then pip install -r requirements-$CI_DATABASE.txt ; fi
- pip install -r ci/requirements-travis.txt
- pip install -r requirements-optional.txt -r requirements-test.txt -r docs/requirements.txt
# create databases
before_script: &before
- ./ci/prepare-database
- ./manage.py collectstatic --noinput
- ./manage.py list_versions
- ./manage.py compilemessages
script:
- ./ci/run-test
# upload coverage
after_script: &after
# Combine partial reports
- coverage combine
- coverage xml
# CodeCov
- codecov
cache:
pip: true
git:
depth: 100
submodules: false
addons: &aptaddon
apt:
packages:
- git-svn
- graphviz
- libcairo-dev
- libacl1-dev
- gir1.2-pango-1.0
- libgirepository1.0-dev
- libenchant1c2a
- g++
- daemon
sources:
- git-core
jobs:
include:
- stage: "Static analysis"
name: "Locales (gettext)"
env: CI_DATABASE=sqlite
before_script: skip
after_script: skip
script:
- ./manage.py compilemessages
- stage: "Static analysis"
name: "Coding style (flake8)"
env: CI_DATABASE=sqlite
before_script: skip
after_script: skip
script:
- flake8
- stage: "Static analysis"
name: "Documentation (sphinx)"
env: CI_DATABASE=sqlite
before_script: skip
after_script: skip
script:
- make -C docs html SPHINXOPTS='-n -W -a'
- stage: "Basic tests"
name: "Django 2.2, postgresql"
env: CI_DEPS="Django>=2.2,<2.3"
addons:
<<: *aptaddon
postgresql: "9.6"
services:
- postgresql
- stage: "Basic tests"
name: "Django 2.2, selenium"
env: CI_DEPS="Django>=2.2,<2.3"
script:
- ./ci/install-sauce
- ./ci/run-selenium
- kill `cat ~/.sauce-pid`
- cat ~/.sauce-log
addons:
<<: *aptaddon
postgresql: "9.6"
- stage: "Basic tests"
name: "Setup"
script:
- ./ci/run-setup
addons:
<<: *aptaddon
postgresql: "9.6"
services:
- postgresql
- stage: "Basic tests"
name: "PostgreSQL Migrations"
env: CI_DEPS="Django>=2.1,<2.2"
script:
- ./ci/run-migrate
addons:
<<: *aptaddon
postgresql: "9.6"
services:
- postgresql
- stage: "Extended tests"
name: "Django 2.2, sqlite"
env: CI_DEPS="Django>=2.2,<2.3" CI_DATABASE=sqlite
- stage: "Extended tests"
name: "Django 2.2, mysql"
env: CI_DEPS="Django>=2.2,<2.3" CI_DATABASE=mysql
addons:
<<: *aptaddon
mariadb: "10.3"
services:
- mysql
- stage: "Extended tests"
name: 'Django 2.1'
env: CI_DEPS="Django>=2.1,<2.2"
addons:
<<: *aptaddon
postgresql: "9.6"
services:
- postgresql
- stage: "Extended tests"
name: 'Django 2.2, Python 3.5'
python: "3.5"
env: CI_DEPS="Django>=2.2,<2.3"
addons:
<<: *aptaddon
postgresql: "9.6"
services:
- postgresql
- stage: "Extended tests"
name: 'Django 1.11, Python 2.7'
python: "2.7"
env: CI_DEPS="Django>=1.11,<1.12"
addons:
<<: *aptaddon
postgresql: "9.6"
services:
- postgresql
- stage: "Extended tests"
name: 'translate-toolkit pre-release'
env: CI_DEPS="https://github.com/translate/translate/archive/master.zip"
addons:
<<: *aptaddon
postgresql: "9.6"
services:
- postgresql
- stage: "Extended tests"
name: "MySQL migrations"
env: CI_DEPS="Django>=2.1,<2.2" CI_DATABASE=mysql
script:
- ./ci/run-migrate
addons:
<<: *aptaddon
mariadb: "10.3"
services:
- mysql