mirror of
https://gh.wpcy.net/https://github.com/WeblateOrg/weblate.git
synced 2026-05-29 05:29:54 +08:00
The 2.0.7 release is broken for MariaDB. See https://code.djangoproject.com/ticket/29544 and https://github.com/django/django/pull/10133 Signed-off-by: Michal Čihař <michal@cihar.com>
93 lines
3 KiB
YAML
Vendored
93 lines
3 KiB
YAML
Vendored
#
|
|
# 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: trusty
|
|
language: python
|
|
python:
|
|
- "3.6"
|
|
# build matrix configuration
|
|
env:
|
|
matrix:
|
|
- CI_DEPS="Django>=2.0,<2.1" CI_DATABASE=sqlite
|
|
- CI_DEPS="Django==2.0.6" CI_DATABASE=mysql
|
|
- CI_DEPS="Django>=2.0,<2.1" CI_DATABASE=postgresql
|
|
- CI_DEPS="Django>=2.0,<2.1" CI_MODE=selenium
|
|
- CI_DEPS="Django>=2.0,<2.1" CI_MODE=setup
|
|
- CI_DEPS="Django>=2.0,<2.1" CI_MODE=migrate
|
|
- CI_DEPS="sphinxcontrib-httpdomain" CI_MODE=docs
|
|
global:
|
|
- DJANGO_SETTINGS_MODULE=weblate.settings_test
|
|
- CI_MODE=test
|
|
- CI_DATABASE=postgresql
|
|
- SAUCE_USERNAME=nijel
|
|
# 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
|
|
- pip install -r requirements-optional.txt -r ci/requirements-travis.txt
|
|
- if [ "$CI_MODE" = selenium -a -n "$SAUCE_USERNAME" -a -n "$SAUCE_ACCESS_KEY" ] ; then ./ci/install-sauce ; fi
|
|
# create databases
|
|
before_script:
|
|
- mysql -e 'SET GLOBAL character_set_server=utf8' -uroot
|
|
- mysql -e 'SET GLOBAL collation_server=utf8_general_ci' -uroot
|
|
- mysql -e 'DROP DATABASE IF EXISTS weblate;' -uroot
|
|
- mysql -e 'CREATE DATABASE weblate CHARACTER SET utf8 COLLATE utf8_general_ci;' -uroot
|
|
- mysql -e 'SHOW VARIABLES LIKE "%version%";' -uroot
|
|
- psql -c 'DROP DATABASE IF EXISTS weblate;' -U postgres
|
|
- psql -c 'CREATE DATABASE weblate;' -U postgres
|
|
- psql -c 'SELECT version();' -U postgres
|
|
- ./manage.py list_versions
|
|
# commands to run tests
|
|
script:
|
|
- ./ci/run-$CI_MODE
|
|
# upload coverage
|
|
after_script:
|
|
# Kill Sauce Connect Proxy if running
|
|
- if [ -f ~/.sauce-pid ] ; then kill `cat ~/.sauce-pid` ; fi
|
|
# Combine partial reports
|
|
- coverage combine
|
|
- coverage xml
|
|
# CodeCov
|
|
- codecov
|
|
# Codacy
|
|
- python-codacy-coverage -r coverage.xml
|
|
# use docker based faster build
|
|
sudo: false
|
|
matrix:
|
|
include:
|
|
- python: "2.7"
|
|
env: CI_DEPS="Django>=1.11,<1.12" CI_DATABASE=postgresql
|
|
- python: "3.6"
|
|
env: CI_DEPS="--pre Django" CI_DATABASE=postgresql
|
|
allow_failures:
|
|
- python: "3.6"
|
|
env: CI_DEPS="--pre Django" CI_DATABASE=postgresql
|
|
addons:
|
|
apt:
|
|
packages:
|
|
- git-svn
|
|
- graphviz
|
|
- g++
|
|
postgresql: "9.6"
|
|
mariadb: "10.3"
|
|
services:
|
|
- postgresql
|
|
- mysql
|
|
cache:
|
|
pip: true
|
|
git:
|
|
depth: 3000
|
|
submodules: false
|