From 5c6473b1056a64147109e41dfb6c276a38513d14 Mon Sep 17 00:00:00 2001 From: Thomas Date: Wed, 20 Jan 2021 09:18:48 +0100 Subject: [PATCH] update travis config --- .travis.yml | 47 ++++++++++++++++++++++++++++------------------- README.md | 5 ----- 2 files changed, 28 insertions(+), 24 deletions(-) diff --git a/.travis.yml b/.travis.yml index 2af8001..5d8e6d9 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,53 +1,62 @@ -sudo: false - language: php +os: linux + +# https://github.com/travis-ci/travis-ci/issues/8863 dist: trusty +services: + - mysql + - postgresql + cache: directories: - $HOME/.composer/cache/files env: global: - - COMPOSER_ROOT_VERSION=4.4.x-dev + - SS_ENVIRONMENT_TYPE=dev + - SS_BASE_URL="http://localhost:8080/" -matrix: +jobs: fast_finish: true include: - - php: 7.1 - env: - - DB=PGSQL - - PHPCS_TEST=1 - - php: 7.2 env: - DB=PGSQL - PDO=1 - - php: 7.3 env: - DB=MYSQL - PDO=1 + - PHPCS_TEST=1 + - PHPUNIT_TEST=1 + - php: 7.4 + env: + - DB=MYSQL + - PDO=1 before_script: -# Extra $PATH - - export PATH=~/.composer/vendor/bin:$PATH + # COMPOSER + # install $COMPOSER_VERSION if defined, otherwise use Composer v1 with PHP <= 7.3, Composer v2 for >= 7.3 + - if [ $COMPOSER_VERSION ] ; then composer self-update --$COMPOSER_VERSION ; elif [ $(php -r 'echo (int) version_compare(phpversion(), "7.3.0", "<=");') = "1" ] ; then composer self-update --1; else composer self-update --2; fi + - composer --version -# Init PHP - - pecl channel-update pecl.php.net + # PHPENV - phpenv rehash - phpenv config-rm xdebug.ini || true - - echo 'memory_limit = 2048M' >> ~/.phpenv/versions/$(phpenv version-name)/etc/conf.d/travis.ini + - if [[ $PHPUNIT_COVERAGE_TEST ]]; then memlimit='8192M'; else memlimit='4096M'; fi + - echo "memory_limit = ${memlimit}" >> ~/.phpenv/versions/$(phpenv version-name)/etc/conf.d/travis.ini + - echo 'always_populate_raw_post_data = -1' >> ~/.phpenv/versions/$(phpenv version-name)/etc/conf.d/travis.ini -# Install composer dependencies + # Install composer dependencies - composer validate - - if [[ $DB == PGSQL ]]; then composer require silverstripe/postgresql:2.2.x-dev --no-update; fi - - if [[ $DB == SQLITE ]]; then composer require silverstripe/sqlite3:2.2.x-dev --no-update; fi + - if [[ $DB == PGSQL ]]; then composer require silverstripe/postgresql:^2 --no-update; fi + - if [[ $DB == SQLITE ]]; then composer require silverstripe/sqlite3:^2 --no-update; fi - if [[ $PHPCS_TEST ]]; then composer global require squizlabs/php_codesniffer:^3 --prefer-dist --no-interaction --no-progress --no-suggest -o; fi - composer install --prefer-source --no-interaction --no-progress --no-suggest --optimize-autoloader --verbose --profile -# Log constants to CI for debugging purposes + # Log constants to CI for debugging purposes - php vendor/silverstripe/framework/tests/dump_constants.php script: diff --git a/README.md b/README.md index 3b2174c..18c8468 100644 --- a/README.md +++ b/README.md @@ -13,11 +13,6 @@ [![Monthly Downloads](https://poser.pugx.org/lekoala/silverstripe-sparkpost/d/monthly)](https://packagist.org/packages/lekoala/silverstripe-sparkpost) [![Daily Downloads](https://poser.pugx.org/lekoala/silverstripe-sparkpost/d/daily)](https://packagist.org/packages/lekoala/silverstripe-sparkpost) -[![Dependency Status](https://www.versioneye.com/php/lekoala:silverstripe-sparkpost/badge.svg)](https://www.versioneye.com/php/lekoala:silverstripe-sparkpost) -[![Reference Status](https://www.versioneye.com/php/lekoala:silverstripe-sparkpost/reference_badge.svg?style=flat)](https://www.versioneye.com/php/lekoala:silverstripe-sparkpost/references) - -![codecov.io](https://codecov.io/github/lekoala/silverstripe-sparkpost/branch.svg?branch=master) - ## Setup Define in your .env file the following variable