-
Notifications
You must be signed in to change notification settings - Fork 14
/
.travis.yml
38 lines (38 loc) · 1.51 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
language: php
php:
- 5.4
- 5.5
- 5.6
env:
- SYMFONY="2.6.*"
services:
- elasticsearch
install:
- sudo pip install -q sphinx --use-mirrors
- wget -q -O conf.py https://raw.githubusercontent.com/ongr-io/docs-aggregator/master/source/conf-travis.py
- mkdir _static
- composer require --no-update symfony/symfony:${SYMFONY}
before_install:
# SQL settings
- sudo chmod 0644 /etc/mysql/my.cnf
- sudo sed "/skip-external-locking/a log-bin=mysql-bin\nbinlog_format = ROW\ndatadir = /var/lib/mysql" -i /etc/mysql/my.cnf
- sudo cat /etc/mysql/my.cnf
- sudo usermod -g travis mysql
- sudo chmod -R 0777 /var/lib/mysql
- sudo service mysql restart
before_script:
- composer self-update
- echo "USE mysql;\nUPDATE user SET password=PASSWORD('root') WHERE user='root';\nFLUSH PRIVILEGES;\n" | mysql -u root
- composer update --prefer-source
script:
- vendor/bin/phpunit --coverage-text --coverage-clover=coverage.clover
- vendor/bin/phpcs -p --standard=$TRAVIS_BUILD_DIR/vendor/ongr/ongr-strict-standard/Ongr --ignore=vendor/,Tests/app/,Resources/public/,Sync/DiffProvider/DiffProvider.php,Sync/DiffProvider/Item/BaseDiffItem.php ./
- sphinx-build -nWq -b html -c . Resources/doc _build/html
after_script:
- wget https://scrutinizer-ci.com/ocular.phar
- php ocular.phar code-coverage:upload --format=php-clover coverage.clover
- '[ "${TRAVIS_PULL_REQUEST}" = "false" ] && wget --post-data="" -q -O /dev/null http://readthedocs.org/build/ongr'
cache:
directories:
- vendor/
- $HOME/.composer/cache