Reduce travis load for v11
This commit is contained in:
parent
7fdc63faa6
commit
26f07992a9
86
.travis.yml
86
.travis.yml
@ -5,13 +5,15 @@
|
|||||||
# We use dist: trusty to have php 5.4+ available
|
# We use dist: trusty to have php 5.4+ available
|
||||||
os: linux
|
os: linux
|
||||||
dist: trusty
|
dist: trusty
|
||||||
sudo: required
|
#sudo: required
|
||||||
|
|
||||||
language: php
|
language: php
|
||||||
|
|
||||||
# Start on every boot
|
# Start on every boot
|
||||||
services:
|
services:
|
||||||
- memcached
|
- memcached
|
||||||
|
- mysql
|
||||||
|
- postgresql
|
||||||
|
|
||||||
addons:
|
addons:
|
||||||
mariadb: '10.0'
|
mariadb: '10.0'
|
||||||
@ -29,60 +31,25 @@ addons:
|
|||||||
# We need pgloader for import mysql database into pgsql
|
# We need pgloader for import mysql database into pgsql
|
||||||
- pgloader
|
- pgloader
|
||||||
|
|
||||||
php:
|
|
||||||
- '5.5'
|
|
||||||
- '5.6'
|
|
||||||
- '7.0'
|
|
||||||
- '7.1'
|
|
||||||
- '7.2'
|
|
||||||
- '7.3'
|
|
||||||
- '7.4'
|
|
||||||
- nightly
|
|
||||||
|
|
||||||
env:
|
env:
|
||||||
global:
|
global:
|
||||||
# Set to true for very verbose output
|
# Set to true for very verbose output
|
||||||
- DEBUG=false
|
- DEBUG=false
|
||||||
jobs:
|
|
||||||
# MariaDB overrides MySQL installation so it's not possible to test both yet
|
|
||||||
#- DB=mysql
|
|
||||||
- DB=mariadb
|
|
||||||
- DB=postgresql
|
|
||||||
# TODO
|
|
||||||
#- DB=sqlite
|
|
||||||
# See https://docs.travis-ci.com/user/languages/php/#Apache-%2B-PHP
|
|
||||||
#- WS=apache
|
|
||||||
# See https://github.com/DracoBlue/travis-ci-nginx-php-fpm-test
|
|
||||||
#- WS=nginx
|
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
fast_finish: true
|
fast_finish: true
|
||||||
allow_failures:
|
allow_failures:
|
||||||
- php: nightly
|
- php: nightly
|
||||||
# We exclude some combinations not usefull to save Travis CPU
|
include:
|
||||||
exclude:
|
- if: type = push
|
||||||
- php: '5.6'
|
php: '5.5'
|
||||||
env: DB=mariadb
|
env: DB=postgresql
|
||||||
- php: '7.0'
|
- if: type = pull_request OR type = push
|
||||||
env: DB=mariadb
|
php: '7.4'
|
||||||
- php: '7.1'
|
env: DB=mysql
|
||||||
env: DB=mariadb
|
- if: type = push AND branch = develop
|
||||||
- php: '7.2'
|
php: nightly
|
||||||
env: DB=mariadb
|
env: DB=mysql
|
||||||
- php: '7.3'
|
|
||||||
env: DB=mariadb
|
|
||||||
- php: '5.6'
|
|
||||||
env: DB=postgresql
|
|
||||||
- php: '7.0'
|
|
||||||
env: DB=postgresql
|
|
||||||
- php: '7.1'
|
|
||||||
env: DB=postgresql
|
|
||||||
- php: '7.2'
|
|
||||||
env: DB=postgresql
|
|
||||||
- php: '7.3'
|
|
||||||
env: DB=postgresql
|
|
||||||
- php: nightly
|
|
||||||
env: DB=postgresql
|
|
||||||
|
|
||||||
notifications:
|
notifications:
|
||||||
email:
|
email:
|
||||||
@ -115,6 +82,7 @@ install:
|
|||||||
echo "Updating Composer"
|
echo "Updating Composer"
|
||||||
rm $TRAVIS_BUILD_DIR/composer.json
|
rm $TRAVIS_BUILD_DIR/composer.json
|
||||||
rm $TRAVIS_BUILD_DIR/composer.lock
|
rm $TRAVIS_BUILD_DIR/composer.lock
|
||||||
|
composer -V
|
||||||
composer self-update
|
composer self-update
|
||||||
# To have composer making parallel downloads
|
# To have composer making parallel downloads
|
||||||
composer global require hirak/prestissimo
|
composer global require hirak/prestissimo
|
||||||
@ -149,6 +117,9 @@ install:
|
|||||||
- |
|
- |
|
||||||
echo "Adding path of binaries tools installed by composer to the PATH"
|
echo "Adding path of binaries tools installed by composer to the PATH"
|
||||||
export PATH="$TRAVIS_BUILD_DIR/htdocs/includes/bin:$PATH"
|
export PATH="$TRAVIS_BUILD_DIR/htdocs/includes/bin:$PATH"
|
||||||
|
echo $PATH
|
||||||
|
ls $TRAVIS_BUILD_DIR/vendor
|
||||||
|
ls $TRAVIS_BUILD_DIR/htdocs/includes/bin
|
||||||
echo
|
echo
|
||||||
|
|
||||||
|
|
||||||
@ -175,15 +146,16 @@ before_script:
|
|||||||
|
|
||||||
- |
|
- |
|
||||||
echo "Versions information"
|
echo "Versions information"
|
||||||
|
echo
|
||||||
# Check PHP
|
# Check PHP
|
||||||
echo "PHP version"
|
echo "PHP version"
|
||||||
php -i | head -
|
php -i | head -
|
||||||
# Check PHP CodeSniffer installation
|
# Check PHP CodeSniffer version
|
||||||
echo "PHPCS version"
|
echo "PHPCS version"
|
||||||
which phpcs
|
which phpcs
|
||||||
phpcs --version | head -
|
phpcs --version | head -
|
||||||
phpcs -i | head -
|
phpcs -i | head -
|
||||||
# Check PHPUnit installation
|
# Check PHPUnit version
|
||||||
echo "PHPUnit version"
|
echo "PHPUnit version"
|
||||||
which phpunit
|
which phpunit
|
||||||
phpunit --version | head -
|
phpunit --version | head -
|
||||||
@ -264,10 +236,7 @@ before_script:
|
|||||||
- sudo sed -i -e "s,www-data,travis,g" /etc/apache2/envvars
|
- sudo sed -i -e "s,www-data,travis,g" /etc/apache2/envvars
|
||||||
- sudo chown -R travis:travis /var/lib/apache2/fastcgi
|
- sudo chown -R travis:travis /var/lib/apache2/fastcgi
|
||||||
- ~/.phpenv/versions/$(phpenv version-name)/sbin/php-fpm
|
- ~/.phpenv/versions/$(phpenv version-name)/sbin/php-fpm
|
||||||
# configure apache virtual hosts for precise
|
# configure apache virtual hosts
|
||||||
#- sudo sed -e "s?%TRAVIS_BUILD_DIR%?$(pwd)?g" --in-place /etc/apache2/sites-available/default
|
|
||||||
#- sudo cat /etc/apache2/sites-available/default
|
|
||||||
# configure apache virtual hosts for trusty
|
|
||||||
- sudo cp -f build/travis-ci/apache.conf /etc/apache2/sites-available/000-default.conf
|
- sudo cp -f build/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 sed -e "s?%TRAVIS_BUILD_DIR%?$(pwd)?g" --in-place /etc/apache2/sites-available/000-default.conf
|
||||||
- sudo cat /etc/apache2/sites-available/000-default.conf
|
- sudo cat /etc/apache2/sites-available/000-default.conf
|
||||||
@ -292,17 +261,18 @@ script:
|
|||||||
# Ensure we catch errors
|
# Ensure we catch errors
|
||||||
set -e
|
set -e
|
||||||
#parallel-lint --exclude htdocs/includes --blame .
|
#parallel-lint --exclude htdocs/includes --blame .
|
||||||
parallel-lint --exclude dev/namespacemig --exclude htdocs/includes/myclabs --exclude htdocs/includes/webmozart --exclude htdocs/includes/phpspec --exclude htdocs/includes/sabre --exclude htdocs/includes/phpoffice/phpexcel/Classes/PHPExcel/Shared --exclude htdocs/includes/phpoffice/PhpSpreadsheet --exclude htdocs/includes/sebastian --exclude htdocs/includes/squizlabs/php_codesniffer/tests --exclude htdocs/includes/jakub-onderka/php-parallel-lint/tests --exclude htdocs/includes/mike42/escpos-php/example --exclude htdocs/includes/phpunit/php-token-stream/tests --exclude htdocs/includes/composer/autoload_static.php --blame .
|
parallel-lint --exclude dev/namespacemig --exclude htdocs/includes/composer --exclude htdocs/includes/myclabs --exclude htdocs/includes/webmozart --exclude htdocs/includes/phpspec --exclude htdocs/includes/sabre --exclude htdocs/includes/phpoffice/phpexcel/Classes/PHPExcel/Shared --exclude htdocs/includes/phpoffice/PhpSpreadsheet --exclude htdocs/includes/sebastian --exclude htdocs/includes/squizlabs/php_codesniffer/tests --exclude htdocs/includes/jakub-onderka/php-parallel-lint/tests --exclude htdocs/includes/mike42/escpos-php/example --exclude htdocs/includes/phpunit/php-token-stream/tests --exclude htdocs/includes/composer/autoload_static.php --blame .
|
||||||
set +e
|
set +e
|
||||||
echo
|
echo
|
||||||
|
|
||||||
- |
|
- |
|
||||||
echo "Checking coding style (excluding Pull Requests builds)"
|
echo "Checking coding style (excluding Pull Requests builds to not overload travis, excluding also some jobs to avoid duplicate tests)"
|
||||||
# Ensure we catch errors
|
# Ensure we catch errors
|
||||||
set -e
|
set -e
|
||||||
# Exclusions are defined in the ruleset.xml file
|
# Exclusions are defined in the ruleset.xml file
|
||||||
#phpcs -s -n -p -d memory_limit=-1 --colors --tab-width=4 --standard=dev/setup/codesniffer/ruleset.xml --encoding=utf-8 .
|
if [ "$TRAVIS_PULL_REQUEST" = "false" ] && [ "$TRAVIS_PHP_VERSION" = "7.4" ]; then
|
||||||
if [ "$TRAVIS_PULL_REQUEST" = "false" ]; then phpcs -s -p -d memory_limit=-1 --extensions=php --colors --tab-width=4 --standard=dev/setup/codesniffer/ruleset.xml --encoding=utf-8 --runtime-set ignore_warnings_on_exit true .; fi
|
phpcs -s -p -d memory_limit=-1 --extensions=php --colors --tab-width=4 --standard=dev/setup/codesniffer/ruleset.xml --encoding=utf-8 --runtime-set ignore_warnings_on_exit true .;
|
||||||
|
fi
|
||||||
set +e
|
set +e
|
||||||
echo
|
echo
|
||||||
|
|
||||||
@ -431,7 +401,7 @@ script:
|
|||||||
|
|
||||||
after_script:
|
after_script:
|
||||||
- |
|
- |
|
||||||
echo "After script - Output lines of dolibarr.log"
|
echo "After script - Output last lines of dolibarr.log"
|
||||||
ls $TRAVIS_BUILD_DIR/documents
|
ls $TRAVIS_BUILD_DIR/documents
|
||||||
#cat $TRAVIS_BUILD_DIR/documents/dolibarr.log
|
#cat $TRAVIS_BUILD_DIR/documents/dolibarr.log
|
||||||
sudo tail -n 50 $TRAVIS_BUILD_DIR/documents/dolibarr.log
|
sudo tail -n 50 $TRAVIS_BUILD_DIR/documents/dolibarr.log
|
||||||
@ -457,7 +427,7 @@ after_failure:
|
|||||||
# Dolibarr log file
|
# Dolibarr log file
|
||||||
echo "Debugging informations for file dolibarr.log (latest 50 lines)"
|
echo "Debugging informations for file dolibarr.log (latest 50 lines)"
|
||||||
tail -n 50 $TRAVIS_BUILD_DIR/documents/dolibarr.log
|
tail -n 50 $TRAVIS_BUILD_DIR/documents/dolibarr.log
|
||||||
# MariaDB log file
|
# Database log file
|
||||||
echo "Debugging informations for file mysql error.log"
|
echo "Debugging informations for file mysql error.log"
|
||||||
sudo tail -n 50 /var/log/mysql/error.log
|
sudo tail -n 50 /var/log/mysql/error.log
|
||||||
# TODO: PostgreSQL log file
|
# TODO: PostgreSQL log file
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user