0
0
Fork 0
mirror of https://github.com/kevinpapst/kimai2.git synced 2025-03-19 23:23:19 +00:00
kevinpapst_kimai2/.travis.yml

79 lines
2.1 KiB
YAML
Raw Permalink Normal View History

2019-08-01 17:25:38 +00:00
dist: xenial
2016-10-20 20:10:41 +00:00
language: php
cache:
directories:
- $HOME/.composer/cache/files
matrix:
include:
2019-08-01 17:25:38 +00:00
- stage: Code quality
env: CODECOVERAGE=0 DB=sqlite
php: '7.2'
script:
- composer validate --no-check-all --strict
- composer kimai:codestyle
- composer kimai:phpstan
- stage: Test
php: '7.2'
env: CODECOVERAGE=0 DB=mysql
sudo: required
services:
- mysql
- stage: Test
php: '7.3'
env: CODECOVERAGE=0 DB=mysql
sudo: required
services:
- mysql
- stage: Test
php: '7.2'
env: CODECOVERAGE=0 DB=sqlite
- stage: Test
#php: '7.4snapshot'
php: '7.3'
env: CODECOVERAGE=0 DB=sqlite
- stage: Test
php: '7.2'
env: CODECOVERAGE=0 DB=mariadb
addons:
mariadb: '10.2'
services:
- mysql
2019-08-01 17:25:38 +00:00
before_script:
- mysql -u root -e 'CREATE USER IF NOT EXISTS travis@localhost; GRANT ALL ON *.* TO travis@localhost;'
- stage: Test
php: '7.3'
env: CODECOVERAGE=0 DB=mariadb
addons:
mariadb: '10.2'
services:
- mysql
2019-08-01 17:25:38 +00:00
before_script:
- mysql -u root -e 'CREATE USER IF NOT EXISTS travis@localhost; GRANT ALL ON *.* TO travis@localhost;'
- stage: Code coverage
php: '7.3'
env: CODECOVERAGE=1 DB=sqlite
after_success:
- if [[ $CODECOVERAGE == 1 ]]; then bash <(curl -s https://codecov.io/bash); fi
2016-10-20 20:10:41 +00:00
before_install:
2019-08-01 17:25:38 +00:00
- if [[ $CODECOVERAGE == 0 ]]; then phpenv config-rm xdebug.ini; fi;
2016-10-20 20:10:41 +00:00
- composer self-update
- php -i
- php -m
2016-10-20 20:10:41 +00:00
install:
- composer install
- composer require zendframework/zend-ldap
2016-10-20 20:10:41 +00:00
script:
- if [[ $CODECOVERAGE == 1 ]]; then TEST_WITH_BUNDLES=1 vendor/bin/phpunit tests/ --coverage-clover=coverage.xml; fi;
2019-08-01 17:25:38 +00:00
- if [[ $CODECOVERAGE == 0 ]]; then vendor/bin/phpunit tests/; fi;
- if [[ $DB == 'sqlite' ]]; then cp tests/.env.dist.sqlite .env; fi;
- if [[ $DB == "mysql" || $DB == "mariadb" ]]; then cp tests/.env.dist.mysql .env; fi;
2018-07-21 20:36:36 +00:00
- bin/console doctrine:database:create -n
- bin/console doctrine:migrations:migrate -n
- bin/console doctrine:migrations:migrate first -n
2019-06-01 09:53:27 +00:00