You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
58 lines
1.5 KiB
58 lines
1.5 KiB
language: php
|
|
|
|
dist: xenial
|
|
|
|
addons:
|
|
postgresql: "9.6"
|
|
|
|
services:
|
|
- postgresql
|
|
- mysql
|
|
|
|
php:
|
|
- 5.6
|
|
- 7.0
|
|
- 7.4
|
|
|
|
env:
|
|
global:
|
|
- DEFAULT=1
|
|
|
|
matrix:
|
|
include:
|
|
- php: 5.6
|
|
env: PREFER_LOWEST=1
|
|
|
|
- php: 7.2
|
|
env: PHPCS=1 DEFAULT=0
|
|
|
|
- php: 7.1
|
|
env: PHPSTAN=1 DEFAULT=0
|
|
|
|
before_install:
|
|
- phpenv config-rm xdebug.ini
|
|
|
|
before_script:
|
|
- if [[ $PREFER_LOWEST != 1 ]]; then travis_retry composer update --no-interaction --prefer-stable; fi
|
|
- if [[ $PREFER_LOWEST == 1 ]]; then travis_retry composer update --no-interaction --prefer-stable --prefer-lowest; fi
|
|
- if [[ $DEFAULT = 1 ]]; then mysql -e 'create database phinx_testing;'; fi
|
|
- if [[ $DEFAULT = 1 ]]; then psql -c 'create database phinx_testing;' -U postgres; fi
|
|
- if [[ $DEFAULT = 1 ]]; then psql -c 'create extension if not exists citext;' -U postgres; fi
|
|
|
|
- if [[ $PHPCS = 1 ]]; then composer require --dev squizlabs/php_codesniffer:^3.1.1; fi
|
|
- if [[ $PHPSTAN = 1 ]]; then composer require --dev phpstan/phpstan:^0.9; fi
|
|
|
|
script:
|
|
- if [[ $DEFAULT = 1 ]]; then vendor/bin/phpunit --coverage-text --coverage-clover=coverage.clover; fi
|
|
- if [[ $PHPSTAN = 1 ]]; then vendor/bin/phpstan analyse -c phpstan.neon -l 4 src/; fi
|
|
- if [[ $PHPCS = 1 ]]; then vendor/bin/phpcs -p -s src/; fi
|
|
|
|
after_success:
|
|
- if [[ $DEFAULT = 1 ]]; then bash <(curl -s https://codecov.io/bash); fi
|
|
|
|
cache:
|
|
directories:
|
|
- $HOME/.composer/cache
|
|
|
|
notifications:
|
|
email: false
|
|
|