# See https://github.com/silverstripe/silverstripe-travis-support for setup details

sudo: false

language: php

matrix:
  include:
    - php: 5.3
      env: DB=MYSQL CORE_RELEASE=3.4
    - php: 5.4
      env: DB=MYSQL CORE_RELEASE=3.5
    - php: 5.6
      env: DB=MYSQL CORE_RELEASE=3
    - php: 5.6
      env: DB=MYSQL CORE_RELEASE=3.5 SECUREASSETS=1
    - php: 7.1
      env: DB=MYSQL CORE_RELEASE=3.6

before_script:
  - git clone git://github.com/silverstripe/silverstripe-travis-support.git ~/travis-support
  - "if [ \"$SECUREASSETS\" = \"\" ]; then php ~/travis-support/travis_setup.php --source `pwd` --target ~/builds/ss; fi"
  - "if [ \"$SECUREASSETS\" = \"1\" ]; then php ~/travis-support/travis_setup.php --source `pwd` --target ~/builds/ss --require silverstripe/secureassets; fi"
  - cd ~/builds/ss

script:
  - vendor/bin/phpunit --coverage-clover coverage.clover userforms/tests

after_success:
  - mv coverage.clover ~/build/$TRAVIS_REPO_SLUG/
  - cd ~/build/$TRAVIS_REPO_SLUG
  - wget https://scrutinizer-ci.com/ocular.phar
  - php ocular.phar code-coverage:upload --format=php-clover coverage.clover

# See https://github.com/silverstripe/silverstripe-travis-support for setup details

sudo: false

language: php

dist: precise

matrix:
  include:
    - php: 5.3
      env: DB=MYSQL CORE_RELEASE=3.4
    - php: 5.4
      env: DB=MYSQL CORE_RELEASE=3.5
    - php: 5.6
      env: DB=MYSQL CORE_RELEASE=3
    - php: 5.6
      env: DB=MYSQL CORE_RELEASE=3.5 SECUREASSETS=1
    - php: 7.1
      env: DB=MYSQL CORE_RELEASE=3.6

before_script:
  - git clone git://github.com/silverstripe/silverstripe-travis-support.git ~/travis-support
  - "if [ \"$SECUREASSETS\" = \"\" ]; then php ~/travis-support/travis_setup.php --source `pwd` --target ~/builds/ss; fi"
  - "if [ \"$SECUREASSETS\" = \"1\" ]; then php ~/travis-support/travis_setup.php --source `pwd` --target ~/builds/ss --require silverstripe/secureassets; fi"
  - cd ~/builds/ss

script:
  - vendor/bin/phpunit --coverage-clover coverage.clover userforms/tests

after_success:
  - mv coverage.clover ~/build/$TRAVIS_REPO_SLUG/
  - cd ~/build/$TRAVIS_REPO_SLUG
  - wget https://scrutinizer-ci.com/ocular.phar
  - php ocular.phar code-coverage:upload --format=php-clover coverage.clover

Use precise dist to continue PHP 5.3 support
Use precise dist to continue PHP 5.3 support
