Skip to content

Commit

Permalink
update travis config
Browse files Browse the repository at this point in the history
  • Loading branch information
lekoala committed Jan 20, 2021
1 parent 31930af commit 5c6473b
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 24 deletions.
47 changes: 28 additions & 19 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -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:
Expand Down
5 changes: 0 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 5c6473b

Please sign in to comment.