]> git.agnieray.net Git - galette.git/blob - .travis.yml
Replacements: no INPUT capacity for Texts (emails)
[galette.git] / .travis.yml
1 sudo: false
2 services:
3 - postgresql
4 - mysql
5 before_script:
6 - if [[ ${TRAVIS_PHP_VERSION:0:3} == "7.4" && $DB == "mysql" ]]; then echo 'nothing to do'; else phpenv config-rm xdebug.ini; fi
7 - sed -e 's/"USER_DB", "galette_tests"/"USER_DB", "root"/' -e 's/"PWD_DB", "g@l3tte"/"PWD_DB", ""/' -i tests/config/mysql/config.inc.php
8 - sed -e 's/"USER_DB", "galette_tests"/"USER_DB", "postgres"/' -e 's/"PWD_DB", "g@l3tte"/"PWD_DB", ""/' -i tests/config/pgsql/config.inc.php
9 - ./bin/install_deps
10 - sh -c "if [ '$DB' = 'pgsql' ]; then psql -c 'DROP DATABASE IF EXISTS galette_tests;' -U postgres; fi"
11 - sh -c "if [ '$DB' = 'pgsql' ]; then psql -c 'create database galette_tests;' -U postgres; fi"
12 - sh -c "if [ '$DB' = 'pgsql' ]; then psql -d galette_tests -a -f galette/install/scripts/pgsql.sql -U postgres; fi"
13 - sh -c "if [ '$DB' = 'mysql' ]; then mysql -e 'create database IF NOT EXISTS galette_tests;'; fi"
14 - sh -c "if [ '$DB' = 'mysql' ]; then mysql -e 'use galette_tests; source galette/install/scripts/mysql.sql;'; fi"
15 - 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
16
17 script:
18 - 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
19 - 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
20 - php galette/vendor/bin/atoum -mcn 1 -bf tests/TestsBootstrap.php --no-cc -d tests/Galette/
21 # - if [[ ${TRAVIS_PHP_VERSION:0:3} == "7.4" && $DB == "mysql" ]]; then php galette/vendor/bin/atoum -mcn 1 -bf tests/TestsBootstrap.php -c tests/clover.php -d tests/Galette/; fi
22 # - if [[ ${TRAVIS_PHP_VERSION:0:3} == "7.4" && $DB == "mysql" ]]; then echo 'nothing to do'; else php galette/vendor/bin/atoum -mcn 1 -bf tests/TestsBootstrap.php --no-cc -d tests/Galette/; fi
23 - php galette/cron/reminder.php
24
25 #after_script:
26 # ## Scrutinizer
27 # - if [[ ${TRAVIS_PHP_VERSION:0:3} == "7.4" && $DB == "mysql" ]]; then wget https://scrutinizer-ci.com/ocular.phar; fi
28 # - if [[ ${TRAVIS_PHP_VERSION:0:3} == "7.4" && $DB == "mysql" ]]; then php ocular.phar code-coverage:upload --format=php-clover tests/clover.xml; fi
29
30 language: php
31
32 php:
33 - 7.4
34 - 7.3
35 - nightly
36
37 matrix:
38 allow_failures:
39 - php: nightly
40
41 env:
42 - DB=pgsql
43 - DB=mysql
44
45 cache:
46 directories:
47 - $HOME/.composer/cache/files
48 - $HOME/.npm/_cacache
49
50 notifications:
51 webhooks:
52 urls:
53 - "https://scalar.vector.im/api/neb/services/hooks/dHJhdmlzLWNpLyU0MGpvaGFuLmN3aSUzQW1hdHJpeC5vcmcvJTIxUklBdnZwRFBnQkl1ZlBva0JDJTNBbWF0cml4Lm9yZw"
54 on_success: change # always|never|change
55 on_failure: always
56 on_start: never