]> git.agnieray.net Git - galette.git/blob - .travis.yml
Merge branch 'release/0.9.4.1' into develop
[galette.git] / .travis.yml
1 sudo: false
2 services:
3 - postgresql
4 - mysql
5 before_script:
6 - ./bin/install_deps
7 - sh -c "if [ '$DB' = 'pgsql' ]; then psql -c 'DROP DATABASE IF EXISTS galette_tests;' -U postgres; fi"
8 - sh -c "if [ '$DB' = 'pgsql' ]; then psql -c 'create database galette_tests;' -U postgres; fi"
9 - sh -c "if [ '$DB' = 'pgsql' ]; then psql -d galette_tests -a -f galette/install/scripts/pgsql.sql -U postgres; fi"
10 - sh -c "if [ '$DB' = 'mysql' ]; then mysql -e 'create database IF NOT EXISTS galette_tests;'; fi"
11 - sh -c "if [ '$DB' = 'mysql' ]; then mysql -e 'use galette_tests; source galette/install/scripts/mysql.sql;'; fi"
12 - if [[ ${TRAVIS_PHP_VERSION:0:3} == "7.4" && $DB == "mysql" ]]; then cd galette && composer require squizlabs/php_codesniffer && composer require maglnet/composer-require-checker && cd ..; fi
13
14 script:
15 - if [[ ${TRAVIS_PHP_VERSION:0:3} == "7.4" && $DB == "mysql" ]]; then galette/vendor/bin/phpcs -n -p --ignore=galette_tcpdf_config.php --standard=phpcs-rules.xml galette/lib/ tests/TestsBootstrap.php tests/Galette tests/plugins galette/webroot/index.php galette/includes/fields_defs/ galette/includes/smarty_plugins/ galette/includes/functions.inc.php galette/includes/galette.inc.php galette/includes/dependencies.php galette/includes/main.inc.php; fi
16 - if [[ ${TRAVIS_PHP_VERSION:0:3} == "7.4" && $DB == "mysql" ]]; then cd galette && vendor/bin/composer-require-checker check --config-file=../.composer-require-checker.config.json && cd ..; fi
17 - php galette/vendor/bin/atoum -mcn 1 -bf tests/TestsBootstrap.php -c tests/clover.php -d tests/Galette/
18 - php galette/cron/reminder.php
19
20 after_script:
21 ## Scrutinizer
22 - wget https://scrutinizer-ci.com/ocular.phar
23 - if [[ ${TRAVIS_PHP_VERSION:0:3} == "7.4" && $DB == "pgsql" ]]; then php ocular.phar code-coverage:upload --format=php-clover tests/clover.xml; fi
24
25 language: php
26
27 php:
28 - 7.4
29 # - 7.3
30 - 7.2
31 # - nightly
32
33 matrix:
34 allow_failures:
35 - php: nightly
36
37 env:
38 - DB=pgsql
39 - DB=mysql
40
41 notifications:
42 webhooks:
43 urls:
44 - "https://scalar.vector.im/api/neb/services/hooks/dHJhdmlzLWNpLyU0MGpvaGFuLmN3aSUzQW1hdHJpeC5vcmcvJTIxUklBdnZwRFBnQkl1ZlBva0JDJTNBbWF0cml4Lm9yZw"
45 on_success: change # always|never|change
46 on_failure: always
47 on_start: never