fembooru/.travis.yml

54 lines
2.2 KiB
YAML
Raw Normal View History

2014-02-10 00:33:57 -05:00
language: php
2015-08-09 12:14:28 +01:00
sudo: false
2015-09-26 17:23:52 +01:00
secure: "Td0VfHgdSGrTR96To/OScKikV/kohRclUj1AFi9m0prdFc0q/xP8jZ1EQ0qVtqwkySa9OXsekOBeiQfoqQm+e+aYH6LdBDchqtqYPzl1VAadTAPtk28M9nazl+n7Qf8ftH11WsXTl4JmbjHiwooWV8cRPUM4pQyLBc64Dg8t3vI="
2014-02-19 00:40:16 -05:00
2014-02-10 00:33:57 -05:00
php:
2014-02-19 00:40:16 -05:00
# Here is where we can list the versions of PHP you want to test against
2014-02-10 00:33:57 -05:00
# using major version aliases
- 5.4
- 5.5
2015-08-01 13:44:37 +01:00
- 5.6
2015-08-01 18:40:28 +01:00
- nightly
2014-02-10 00:33:57 -05:00
# optionally specify a list of environments, for example to test different RDBMS
env:
- DB=mysql
2014-02-22 15:51:17 -05:00
- DB=pgsql
2015-08-09 14:37:07 +01:00
- DB=sqlite
2014-02-18 23:18:59 -05:00
install:
# Enable logging of all queries (for debugging) and create the database schema for shimmie.
2015-08-09 12:14:28 +01:00
- mkdir -p data/config
- if [[ "$DB" == "pgsql" ]]; then psql -c "SELECT set_config('log_statement', 'all', false);" -U postgres; fi
- if [[ "$DB" == "pgsql" ]]; then psql -c "CREATE DATABASE shimmie;" -U postgres; fi
2015-08-09 12:14:28 +01:00
- if [[ "$DB" == "pgsql" ]]; then echo '<?php define("DATABASE_DSN", "pgsql:user=postgres;password=;host=;dbname=shimmie");' > data/config/auto_install.conf.php ; fi
- if [[ "$DB" == "mysql" ]]; then mysql -e "SET GLOBAL general_log = 'ON';" -uroot; fi
2014-02-19 00:40:16 -05:00
- if [[ "$DB" == "mysql" ]]; then mysql -e "CREATE DATABASE shimmie;" -uroot; fi
2015-08-09 12:14:28 +01:00
- if [[ "$DB" == "mysql" ]]; then echo '<?php define("DATABASE_DSN", "mysql:user=root;password=;host=localhost;dbname=shimmie");' > data/config/auto_install.conf.php ; fi
- if [[ "$DB" == "sqlite" ]]; then echo '<?php define("DATABASE_DSN", "sqlite:shimmie.sqlite");' > data/config/auto_install.conf.php ; fi
2015-09-26 17:23:52 +01:00
- wget https://scrutinizer-ci.com/ocular.phar
2014-02-18 23:02:10 -05:00
2014-02-18 23:18:59 -05:00
script:
2015-08-09 12:14:28 +01:00
- php install.php
2015-09-26 17:23:52 +01:00
- phpunit --configuration tests/phpunit.xml --coverage-clover=data/coverage.clover
2014-02-10 00:33:57 -05:00
2014-02-18 03:42:59 -05:00
# If a failure occured then dump out a bunch of logs for debugging purposes.
2014-02-18 01:02:11 -05:00
after_failure:
2015-08-09 12:14:28 +01:00
- head -n 100 data/config/*
- ls /var/run/mysql*
- ls /var/log/*mysql*
- cat /var/log/mysql.err
- cat /var/log/mysql.log
- cat /var/log/mysql/error.log
- cat /var/log/mysql/slow.log
- ls /var/log/postgresql
- cat /var/log/postgresql/postgresql*
2014-02-18 01:02:11 -05:00
2015-09-26 17:23:52 +01:00
after_script:
- php ocular.phar code-coverage:upload --access-token=$SCI_TOKEN --format=php-clover --repository=shish/shimmie2 data/coverage.clover
2014-02-10 00:33:57 -05:00
# configure notifications (email, IRC, campfire etc)
#notifications:
2014-02-19 16:16:01 -05:00
# irc: "irc.freenode.org#shimmie"
2015-08-01 13:44:37 +01:00
#