mirror of
https://github.com/silverstripe/silverstripe-postgresql
synced 2024-06-17 10:11:31 +02:00
822d99fd51
This will ensure that our claim that this module works with any framework 4.x version is tested. Note that 4.0.0-4.0.4 has some issues with its own test suite so we are using 4.0.5 to test this.
66 lines
1.8 KiB
YAML
66 lines
1.8 KiB
YAML
language: php
|
|
|
|
dist: xenial
|
|
|
|
services:
|
|
- postgresql
|
|
-
|
|
|
|
cache:
|
|
directories:
|
|
- $HOME/.composer/cache/files
|
|
|
|
php:
|
|
- 7.1
|
|
|
|
env:
|
|
global:
|
|
- DB="PGSQL"
|
|
|
|
matrix:
|
|
fast_finish: true
|
|
include:
|
|
- php: 7.1
|
|
env:
|
|
- PHPUNIT_TEST=framework
|
|
# Test with lowest composer requirements (i.e. framework 4.0). Ensure that recipe version matches composer.json
|
|
- COMPOSER_ARG="--prefer-lowest"
|
|
- RECIPE_VERSION=^4.0.5
|
|
- php: 7.2
|
|
env:
|
|
- PHPUNIT_TEST=framework
|
|
- RECIPE_VERSION=^4.6
|
|
- php: 7.4
|
|
env:
|
|
- PHPUNIT_TEST=framework
|
|
- RECIPE_VERSION=4.x-dev
|
|
|
|
- php: 7.4
|
|
env:
|
|
- PHPUNIT_TEST=postgresql
|
|
- PHPCS_TEST=1
|
|
- php: 7.1
|
|
env:
|
|
- PHPUNIT_TEST=postgresql
|
|
- COMPOSER_ARG="--prefer-lowest"
|
|
- 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
|
|
# Recipe is needed to pull in versioned and other packages for running the framework tests
|
|
- if [[ $RECIPE_VERSION ]]; then composer require --no-update silverstripe/recipe-cms:$RECIPE_VERSION; fi
|
|
- composer update $COMPOSER_ARG --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
|