-
Notifications
You must be signed in to change notification settings - Fork 7
/
.travis.yml
61 lines (53 loc) · 2.62 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
# .travis.yml
env:
- SYNTAX=yes
- DB=mysql WORKSPACE=no
- DB=mysql WORKSPACE=yes
- DB=postgresql
language: php
cache: apt
php:
- 5.6
- 7.0
- 7.1
- 7.2
matrix:
allow_failures:
before_script:
- sudo apt-get update
- sudo apt-get install apache2 libapache2-mod-fastcgi imagemagick wget lynx subversion tidy poppler-utils
# enable php-fpm
- sudo cp ~/.phpenv/versions/$(phpenv version-name)/etc/php-fpm.conf.default ~/.phpenv/versions/$(phpenv version-name)/etc/php-fpm.conf
- if [ -e ~/.phpenv/versions/$(phpenv version-name)/etc/php-fpm.d/www.conf.default ] ; then sudo cp ~/.phpenv/versions/$(phpenv version-name)/etc/php-fpm.d/www.conf.default ~/.phpenv/versions/$(phpenv version-name)/etc/php-fpm.d/www.conf ; fi
- sudo a2enmod rewrite actions fastcgi alias
- echo "cgi.fix_pathinfo = 1" >> ~/.phpenv/versions/$(phpenv version-name)/etc/php.ini
- sudo sed -i -e "s,www-data,travis,g" /etc/apache2/envvars
- sudo chown -R travis:travis /var/lib/apache2/fastcgi
- ~/.phpenv/versions/$(phpenv version-name)/sbin/php-fpm
# configure apache virtual hosts
- sudo cp -f tests/travis-ci-apache /etc/apache2/sites-available/000-default.conf
- sudo sed -e "s?%TRAVIS_BUILD_DIR%?$(pwd)?g" --in-place /etc/apache2/sites-available/000-default.conf
- sudo service apache2 restart
- sudo ln -s ${TRAVIS_BUILD_DIR}/www ${TRAVIS_BUILD_DIR}/ariadne
- svnadmin create ${TRAVIS_BUILD_DIR}/files/temp/testsvn ; svnadmin load ${TRAVIS_BUILD_DIR}/files/temp/testsvn < ${TRAVIS_BUILD_DIR}/tests/svnrepo.log
- sh -c "echo \"<?php \\\$ariadne='${TRAVIS_BUILD_DIR}/lib'; ?>\" | tee ${TRAVIS_BUILD_DIR}/www/ariadne.inc"
- sh -c "if [ ${DB} = 'mysql' ]; then mysqladmin -u root create ariadne; fi"
- sh -c "if [ ${DB} = 'postgresql' ]; then psql -c 'create database ariadne;' -U postgres; fi"
script:
- if [ "${SYNTAX:-no}" == "yes" ] ; then bash ./tests/syntax.sh ; fi
- if [ "${SYNTAX:-no}" != "yes" ] ; then bash ./tests/run.sh ; fi
- if [ "${SYNTAX:-no}" != "yes" ] ; then svnrepo="file://${TRAVIS_BUILD_DIR}/files/temp/testsvn/" phpunit --coverage-clover=coverage.clover ; fi
notifications:
email: false
irc:
secure: "mOc/UjQgoRI1+Ez12A/DWXShtfKjKwDTSuMn8PoSyul8WelNYl6z6zKBflePB8BcYN2TNIaGQQGAXqAJKB1njYG5/RCmF8HVvBUOLWBdcJ7AW2h7bOb30YxYZr+vTXebKhz9TDZHD0lTVI5F6d7JYv0jjfPr4nj6rVhSvkbZUrw="
on_success: change
on_failure: always
use_notice: true
skip_join: true
after_script:
- |
if [ -e 'coverage.clover' ] ; then
wget https://scrutinizer-ci.com/ocular.phar ;
php ocular.phar code-coverage:upload --format=php-clover coverage.clover ;
fi