2016-05-29 15:41:12 +02:00
|
|
|
language: php
|
|
|
|
php:
|
2017-10-17 11:57:00 +02:00
|
|
|
- 7.2
|
2019-02-07 17:20:13 +01:00
|
|
|
- 7.3
|
2020-02-03 18:05:59 +01:00
|
|
|
- 7.4
|
2019-02-09 09:43:04 +01:00
|
|
|
# none of our dependencies allow 8.0
|
|
|
|
# - master
|
2016-05-29 15:41:12 +02:00
|
|
|
|
|
|
|
matrix:
|
|
|
|
fast_finish: true
|
2019-02-09 09:43:04 +01:00
|
|
|
# allow_failures:
|
|
|
|
# - php: master
|
2016-05-29 15:41:12 +02:00
|
|
|
|
2016-07-12 16:54:40 +02:00
|
|
|
services:
|
|
|
|
- memcached
|
2020-03-04 22:43:09 +01:00
|
|
|
- mysql
|
2020-02-03 18:05:59 +01:00
|
|
|
# - postgres
|
2016-05-29 15:41:12 +02:00
|
|
|
|
2016-05-30 18:31:46 +02:00
|
|
|
sudo: required
|
2016-05-30 18:27:31 +02:00
|
|
|
|
2016-05-29 15:41:12 +02:00
|
|
|
before_script:
|
2016-07-12 22:08:49 +02:00
|
|
|
- sudo apt-get update -qq
|
2020-03-04 22:43:09 +01:00
|
|
|
- sudo apt-get install -y libpcre3-dev apache2 libapache2-mod-fastcgi
|
2016-07-12 22:08:49 +02:00
|
|
|
- case $(phpenv version-name) in
|
2018-10-18 11:27:34 +02:00
|
|
|
"7"|"7.0"|"7.1"|"7.2")
|
2016-07-12 22:08:49 +02:00
|
|
|
yes "" | pecl install apcu;
|
2016-08-13 12:30:05 +02:00
|
|
|
echo "extension=memcached.so" >> ~/.phpenv/versions/$(phpenv version-name)/etc/php.ini;
|
2016-08-06 13:04:42 +02:00
|
|
|
phpenv config-rm xdebug.ini;
|
2018-10-18 11:09:53 +02:00
|
|
|
;;
|
2020-02-03 18:05:59 +01:00
|
|
|
"7.3"|"7.4"|"master")
|
2018-10-18 11:27:34 +02:00
|
|
|
echo "extension=memcached.so" >> ~/.phpenv/versions/$(phpenv version-name)/etc/php.ini;
|
|
|
|
;;
|
2018-10-18 11:09:53 +02:00
|
|
|
esac
|
2020-03-04 22:43:09 +01:00
|
|
|
# enable apache with php-fpm see https://docs.travis-ci.com/user/languages/php/#apache--php
|
|
|
|
- sudo cp ~/.phpenv/versions/$(phpenv version-name)/etc/php-fpm.conf.default ~/.phpenv/versions/$(phpenv version-name)/etc/php-fpm.conf
|
|
|
|
- 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 doc/travis-ci-apache.conf /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
|
2020-03-04 23:17:16 +01:00
|
|
|
- curl -i http://localhost/doc/rpm-build/debian.changes
|
|
|
|
- curl -i http://localhost/egroupware/doc/rpm-build/debian.changes
|
2020-02-03 18:05:59 +01:00
|
|
|
- php -m
|
2017-10-19 09:26:50 +02:00
|
|
|
- php -i
|
2019-06-17 15:57:31 +02:00
|
|
|
- php install-cli.php --ignore-platform-reqs
|
2016-07-19 14:18:16 +02:00
|
|
|
# create data directory
|
2016-07-12 20:18:05 +02:00
|
|
|
- sudo mkdir /var/lib/egroupware
|
|
|
|
- sudo chown travis /var/lib/egroupware
|
2016-08-07 10:38:43 +02:00
|
|
|
- ln -s /var/lib/egroupware/header.inc.php
|
2016-05-29 15:41:12 +02:00
|
|
|
|
|
|
|
script:
|
2016-08-06 14:46:56 +02:00
|
|
|
# install egroupware using MariaDB as domain "default"
|
2017-10-17 12:23:25 +02:00
|
|
|
# and add an admin user "demo" with password "guest"
|
2017-10-17 11:56:55 +02:00
|
|
|
- php doc/rpm-build/post_install.php --domain default
|
|
|
|
--source_dir `pwd` --start_db '' --autostart_db '' --start_webserver '' --webserver_user ''
|
2017-10-23 18:57:51 +02:00
|
|
|
--admin_user demo --admin_passwd guest --admin_email noreply@example.com
|
2016-10-27 16:49:21 +02:00
|
|
|
# disable PostgreSQL install as it fails in Travis with Fatal error: Call to unimplemented native function pg_set_client_encoding
|
2016-08-06 14:46:56 +02:00
|
|
|
# install egroupware using PostgreSQL as domain "pgsql", need some specific handling we can not create users via sql
|
2016-10-27 16:49:21 +02:00
|
|
|
#- psql -U postgres -c 'create database egroupware';
|
2016-08-18 20:17:02 +02:00
|
|
|
# disable postgres install for hhvm, as there is no psql extension
|
2016-10-27 16:49:21 +02:00
|
|
|
#- test $(phpenv version-name) = 'hhvm' ||
|
|
|
|
# php doc/rpm-build/post_install.php --domain pgsql --db_type pgsql --db_port 5432 --db_user postgres --db_pass ''
|
|
|
|
# --source_dir `pwd` --start_db '' --autostart_db '' --start_webserver '' --webserver_user ''
|
2016-08-13 11:31:45 +02:00
|
|
|
# install egroupware with LDAP for account and MySQL as domain "ldap"
|
|
|
|
#- php doc/rpm-build/post_install.php --domain ldap --db_name ldap --db_user ldap
|
|
|
|
# --account-auth ldap --ldap_suffix dc=local --ldap_admin 'cn=admin,$suffix' --ldap_admin_pw secret
|
|
|
|
# --source_dir `pwd` --start_db '' --autostart_db '' --start_webserver '' --webserver_user ''
|
2020-03-04 23:03:56 +01:00
|
|
|
- curl -i http://localhost/egroupware/groupdav.php/
|
|
|
|
- grep -n -r 'function setUp' */tests
|
2016-07-12 20:18:05 +02:00
|
|
|
# Ubuntu has problems with #!/usr/bin/env php -dapc.enable=1, it stalls forever
|
2018-05-03 19:14:58 +02:00
|
|
|
- vendor/bin/phpunit -c doc -dapc.enable_cli=1
|
2016-08-13 14:51:01 +02:00
|
|
|
# do not run syntax check for hhvm, as it always fails / get terminated after 10m
|
|
|
|
- test $(phpenv version-name) = 'hhvm' || ./doc/php_syntax_check.sh
|
2016-05-29 15:41:12 +02:00
|
|
|
|
|
|
|
cache:
|
|
|
|
directories:
|
2016-10-27 16:49:21 +02:00
|
|
|
- $HOME/.composer/cache
|