]> git.agnieray.net Git - galette.git/blob - .travis.yml
Translated using Weblate (Arabic)
[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 && 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/ 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 - php galette/vendor/bin/atoum -mcn 1 -bf tests/TestsBootstrap.php -c tests/clover.php -d tests/Galette/
17 - php galette/cron/reminder.php
18
19 after_script:
20 ## Scrutinizer
21 - wget https://scrutinizer-ci.com/ocular.phar
22 - if [[ ${TRAVIS_PHP_VERSION:0:3} == "7.4" && $DB == "pgsql" ]]; then php ocular.phar code-coverage:upload --format=php-clover tests/clover.xml; fi
23
24 language: php
25
26 php:
27 - 7.2
28 - 7.3
29 - 7.4
30 - nightly
31
32 matrix:
33 allow_failures:
34 - php: nightly
35
36 env:
37 - DB=pgsql
38 - DB=mysql