language: php
dist: xenial
sudo: false

env:
  global:
    secure: "ejwL5+8AWrlcno3bSOfLNgNEGe6Kdegk19dr/It4QCZDw9Vs5nmuUq3e7sZ0+CSLVoo5q3L1Zs0YbkDdgkFA8Z2zWyhWxNjIWx+qb1aDh7ffSSileVRiw8ReQ14GiXxGTi0V5zR2zNwY5KdJNor0CsV8hOgZmFz6/qEUzXWY9Kw="

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

services:
  - redis-server
  - mysql


php:
  - 7.3

matrix:
  fast_finish: true

before_script:
    - cp app/config/parameters.yml.dist app/config/parameters.yml
    - 'echo "    github.client_id: $GH_CLIENT_ID" >> app/config/parameters.yml'
    - 'echo "    github.client_secret: $GH_CLIENT_SECRET" >> app/config/parameters.yml'
    - composer install
    - app/console doctrine:database:create --env=test -n
    - app/console doctrine:schema:create --env=test -n

script:
    - vendor/bin/phpunit

git:
  depth: 5
