.travis.yml
language: php
cache:
directories:
- $HOME/.composer/cache
services:
- postgresql
env:
global:
- setup=basic
- coverage=false
before_install:
- composer install
- if [[ $coverage = 'false' ]]; then phpenv config-rm xdebug.ini || true; fi
- curl -L https://codeclimate.com/downloads/test-reporter/test-reporter-latest-linux-amd64 > ./cc-test-reporter
- chmod +x ./cc-test-reporter
- ./cc-test-reporter before-build
install:
- if [[ $setup = 'basic' ]]; then travis_retry composer update --prefer-dist --no-interaction --no-suggest; fi
- if [[ $setup = 'stable' ]]; then travis_retry composer update --prefer-dist --no-interaction --no-suggest --prefer-stable; fi
- if [[ $setup = 'lowest' ]]; then travis_retry composer update --prefer-dist --no-interaction --no-suggest --prefer-lowest; fi
before_script:
- psql -c 'create database testing;' -U postgres
script:
- if [[ $coverage = 'true' ]]; then composer test-cover; else composer test; fi
after_script:
- if [[ $coverage = 'true' ]]; then ./cc-test-reporter after-build --coverage-input-type clover --exit-code $TRAVIS_TEST_RESULT
after_success:
- if [[ $coverage = 'true' ]]; then bash <(curl -s https://codecov.io/bash); fi
matrix:
include:
- php: 7.4
env: setup=stable
- php: 7.4
env: coverage=true
- php: 8.0
env: setup=stable
- php: 8.0
env: coverage=true
- php: nightly
allow_failures:
- php: nightly