This repository has been archived on 2024-09-05. You can view files and clone it, but cannot push or open issues or pull requests.
shimmie2/.travis.yml

62 lines
1.9 KiB
YAML
Raw Normal View History

2014-02-10 05:33:57 +00:00
language: php
php:
2016-05-20 04:44:29 +00:00
- 7.0
2017-03-09 08:13:11 +00:00
- 7.1
2014-02-10 05:33:57 +00:00
sudo: false
2014-02-10 05:33:57 +00:00
env:
2015-09-26 16:41:59 +00:00
matrix:
2016-05-20 04:44:29 +00:00
- DB=mysql
- DB=pgsql
- DB=sqlite
allow_failures:
- DB=sqlite
cache:
directories:
- vendor
- $HOME/.composer/cache
before_install:
- travis_retry composer self-update && composer --version #travis is bad at updating composer
- if [ -n "$GH_TOKEN" ]; then composer config github-oauth.github.com ${GH_TOKEN}; fi;
2014-02-19 04:18:59 +00:00
install:
2016-05-20 04:44:29 +00:00
- mkdir -p data/config
- |
if [[ "$DB" == "pgsql" ]]; then
psql -c "SELECT set_config('log_statement', 'all', false);" -U postgres ;
psql -c "CREATE DATABASE shimmie;" -U postgres ;
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 ;
mysql -e "CREATE DATABASE shimmie;" -uroot ;
echo '<?php define("DATABASE_DSN", "mysql:user=root;password=;host=localhost;dbname=shimmie");' > data/config/auto_install.conf.php ;
fi
2016-05-20 04:44:29 +00:00
- if [[ "$DB" == "sqlite" ]]; then echo '<?php define("DATABASE_DSN", "sqlite:shimmie.sqlite");' > data/config/auto_install.conf.php ; fi
- composer install
- php install.php
2014-02-19 04:02:10 +00:00
2014-02-19 04:18:59 +00:00
script:
2017-03-10 16:21:07 +00:00
- vendor/bin/phpunit --configuration tests/phpunit.xml --coverage-clover=data/coverage.clover
2014-02-10 05:33:57 +00:00
2014-02-18 06:02:11 +00:00
after_failure:
2016-05-20 04:44:29 +00:00
- head -n 100 data/config/*
- ls /var/run/mysql*
# All of the below commands require sudo, which we can't use without losing some speed & caching.
# SEE: https://docs.travis-ci.com/user/workers/container-based-infrastructure/
# - 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 06:02:11 +00:00
2015-09-26 16:23:52 +00:00
after_script:
- wget https://scrutinizer-ci.com/ocular.phar
2016-05-20 04:44:29 +00:00
- php ocular.phar code-coverage:upload --format=php-clover data/coverage.clover