source: branches/version-2_13-dev/.travis.yml @ 22793

Revision 22793, 1.5 KB checked in by kimoto, 8 years ago (diff)

add .travis.yml

Line 
1language: php
2
3php:
4  - 5.4
5  - 5.3
6
7env:
8  - DB=mysql USER=root
9  - DB=pgsql USER=postgres
10
11before_script:
12  - sh -c "if [ '$DB' = 'mysql' ]; then mysql -e 'CREATE DATABASE myapp_test;'; fi"
13  - sh -c "if [ '$DB' = 'mysql' ]; then mysql myapp_test < html/install/sql/create_table_mysql.sql; fi"
14  - sh -c "if [ '$DB' = 'mysql' ]; then mysql myapp_test < html/install/sql/insert_data.sql; fi"
15  - echo "<?php define('ECCUBE_INSTALL', 'ON');define('HTTP_URL', 'http://localhost/');define('HTTPS_URL', 'http://localhost/');define('ROOT_URLPATH', '/');define('DOMAIN_NAME', '');define('DB_TYPE', '$DB');define('DB_USER', '$USER');define('DB_PASSWORD', '');define('DB_SERVER', '127.0.0.1');define('DB_NAME', 'myapp_test');define('DB_PORT', '');define('ADMIN_DIR', 'admin/');define('ADMIN_FORCE_SSL', FALSE);define('ADMIN_ALLOW_HOSTS', 'a:0:{}');define('AUTH_MAGIC', 'chouteavaemicrouchaivojigiatriowioviamit');define('PASSWORD_HASH_ALGOS', 'sha256');define('MAIL_BACKEND', 'mail');define('SMTP_HOST', '');define('SMTP_PORT', '');define('SMTP_USER', '');define('SMTP_PASSWORD', '');" > data/config/config.php
16  - sh -c "if [ '$DB' = 'pgsql' ]; then psql -c 'create database myapp_test;' -U postgres; fi"
17  - sh -c "if [ '$DB' = 'pgsql' ]; then psql myapp_test < html/install/sql/create_table_pgsql.sql -U postgres; fi"
18  - sh -c "if [ '$DB' = 'pgsql' ]; then psql myapp_test < html/install/sql/insert_data.sql -U postgres; fi"
19  - cp tests/require.php.jenkins tests/require.php
20script:
21  - phpunit --bootstrap ./data/config/config.php --configuration tests/phpunit.xml.jenkins tests
Note: See TracBrowser for help on using the repository browser.