silverstripe-postgresql/.travis.yml
2018-06-29 16:29:36 +12:00

41 lines
1.1 KiB
YAML

language: php
dist: trusty
cache:
directories:
- $HOME/.composer/cache/files
env:
global:
- DB="PGSQL"
matrix:
fast_finish: true
include:
- php: 7.1
env:
- PHPUNIT_TEST=framework
- php: 7.2
env:
- PHPUNIT_TEST=postgresql
- PHPCS_TEST=1
before_script:
# Init PHP
- phpenv rehash
- phpenv config-rm xdebug.ini
- export PATH=~/.composer/vendor/bin:$PATH
- echo 'memory_limit = 2048M' >> ~/.phpenv/versions/$(phpenv version-name)/etc/conf.d/travis.ini
# Install composer dependencies
- composer validate
- composer require --no-update silverstripe/recipe-cms:5.x-dev
- composer install --prefer-source --no-interaction --no-progress --no-suggest --optimize-autoloader --verbose --profile
- if [[ $PHPCS_TEST ]]; then composer global require squizlabs/php_codesniffer:^3 --prefer-dist --no-interaction --no-progress --no-suggest -o; fi
script:
- if [[ $PHPUNIT_TEST == postgresql ]]; then vendor/bin/phpunit ./tests; fi
- if [[ $PHPUNIT_TEST == framework ]]; then vendor/bin/phpunit ./vendor/silverstripe/framework/tests/php; fi
- if [[ $PHPCS_TEST ]]; then composer run-script lint; fi