language: php
sudo: false
php:
  - '5.5'
  - '5.6'
  - '7.0'
  - nightly

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

before_install:
  - openssl aes-256-cbc -K $encrypted_90a1b1aba54b_key -iv $encrypted_90a1b1aba54b_iv -in test-key.json.enc -out res/test-key.json -d
  - export GOOGLE_APPLICATION_CREDENTIALS="$(pwd)/res/test-key.json"

install:
  - composer install --prefer-dist

script:
  - php vendor/bin/phpunit --coverage-text --coverage-clover=coverage.clover --colors=never
  - wget https://scrutinizer-ci.com/ocular.phar
  - php ocular.phar code-coverage:upload --format=php-clover coverage.clover
env:
  global:
    - secure: CdActz7vn910CO1LirTpCDbeoU4i5GWHGJRlSzXQMAjWOpPX2ZunVmz03nEd/46iGoD3/90oVntOTz5a1WuZ+qequdbr+uUo+7osa0B1SB8CHDo2cbYgzN+ZbfhkprZ9ksL8vp3zNlv1VQUm0WFuO/0UxDbzpot/NAVB62P1Nrp+oLcoe+e1IeSRAZt5TuazWE7ws9gM63neTRnT4U7nCAyfhDYPi110bTPfYTU4xdbz6Ogkn/laavNExwkdHJv3vs5Y+exNwpKUXhDxF9BFN5SomCqf6ZlxjQ4U4dM0qS02v6Mhvg2HbfIzstJpnP0kW9anBCOsTOI6tyPJQ++J3J0xr6TE24Lsz7UdkEezvoOMIcL/wvqOIBDg+wtCjC3Bi6xJgtRKI0nwzu9Lm4Wn90/OiOfYof3KZ2SM6byNYtiPDx55Ag+bhnUXrYagmbZdQBdwzlnSq+53v6YpDmAreEyrcgRlOcVCvMIGCAstHgsZdpsW2Eaj32hxJ3nYI2E8DHapehbJC0MqroPhcFb2/j582NyMtPcFjS02xKMOcbqJeXJhA+r/kOFX9jI+1KwrOgNFVrPuncsETFCE1pUDzSANwzCbHzTuuYdI6+K4+DoHxfMoq4/kqz9yZe+NoDNkhCIysXAt8XWzgcKzUrlwRdT0tugQrjlh5f30HZkUIS8=
    - secure: LL+nYuz79kioadJrqUJu0NRENllWZqKpVbvC+c27RX8IeEUnN0MP0WVAa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