language: php

sudo: false

dist: trusty

addons:
    postgresql: "9.6"

services:
    - postgresql

git:
    depth: 1

cache:
    directories:
        - $HOME/.composer/cache

php:
    - '7.2'

matrix:
    fast_finish: true

env:
    global:
        - DEFAULT_COMPOSER_FLAGS="--no-interaction --no-progress --no-suggest --prefer-dist"

before_script:
    - psql -c "CREATE DATABASE todora_test;" -U postgres
    - psql -c "CREATE USER todora_test WITH PASSWORD 'todora_test';" -U postgres

before_install:
    - source .travis/xdebug.sh
    - xdebug-disable
    - yes '' | pecl install -f apcu-5.1.9
    - composer self-update

install:
    - travis_retry composer install -a $DEFAULT_COMPOSER_FLAGS
    - travis_retry composer bin all install -a $DEFAULT_COMPOSER_FLAGS

script:
    - composer todora:migrate:test
    - composer todora:analyze
    - vendor/bin/phpunit

notifications:
    email: false

language: php

sudo: false

dist: trusty

addons:
    postgresql: "9.6"

services:
    - postgresql

git:
    depth: 1

cache:
    directories:
        - $HOME/.composer/cache

php:
    - '7.2'

matrix:
    fast_finish: true

env:
    global:
        - DEFAULT_COMPOSER_FLAGS="--no-interaction --no-progress --no-suggest --prefer-dist"

before_script:
    - psql -c "CREATE DATABASE todora_test;" -U postgres
    - psql -c "CREATE USER todora_test WITH PASSWORD 'todora_test';" -U postgres

before_install:
    - source .travis/xdebug.sh
    - xdebug-disable
    - yes '' | pecl install -f apcu-5.1.9
    - yes '' | pecl install -f libsodium
    - echo "extension=sodium.so" >> ~/.phpenv/versions/$(phpenv version-name)/etc/php.ini
    - composer self-update

install:
    - travis_retry composer install -a $DEFAULT_COMPOSER_FLAGS
    - travis_retry composer bin all install -a $DEFAULT_COMPOSER_FLAGS

script:
    - composer todora:migrate:test
    - composer todora:analyze
    - vendor/bin/phpunit

notifications:
    email: false

Install libsodium to provide Argon2i algo in PHP.
Install libsodium to provide Argon2i algo in PHP.
