language: php

sudo: false

dist: bionic

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
    - sudo apt-get update -qq
    - sudo apt-get install build-essential git -y
    - git clone -b stable https://github.com/jedisct1/libsodium.git
    - cd libsodium && sudo ./configure && sudo make check && sudo make install && cd ..
    - yes '' | pecl install -f apcu-5.1.9
    - yes '' | pecl install -f libsodium
    - composer self-update

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

script:
    # this step is needed by syfmony-plugin for phpstan
    - php bin/console cache:warmup -e test
    - composer todora:migrate:test
    - composer todora:analyze
    - vendor/bin/phpunit

notifications:
    email: false

language: php

sudo: false

dist: bionic

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:
    # this step is needed by syfmony-plugin for phpstan
    - php bin/console cache:warmup -e test
    - composer todora:migrate:test
    - composer todora:analyze
    - vendor/bin/phpunit

notifications:
    email: false

Remove not needed sodium compiling
Remove not needed sodium compiling
