language: php

php:
  - 5.6
  - 7.0
  - 7.1

env:
  global:
    - WP_VERSION=trunk
    - WP_VERSION=4.7

before_script:
  - composer install --prefer-source
  - mkdir -p build/logs

script:
  - ./vendor/bin/phpunit --coverage-clover build/logs/clover.xml

after_script:
  - if [ $CODECLIMATE_REPO_TOKEN ]; then ./vendor/bin/test-reporter; fi;

cache:
  directories:
    - includes/lib/
    - vendor/

notifications:
  email: false

sudo: false
language: php

notifications:
  email: false

cache:
  directories:
    - $HOME/.composer/cache
    - includes/lib/
    - vendor/

matrix:
  fast_finish: true
  include:
    - php: 7.2
      env: WP_VERSION=latest
    - php: 7.1
      env: WP_VERSION=latest
    - php: 7.0
      env: WP_VERSION=latest
    - php: 7.2
      env: WP_VERSION=trunk RUN_PHPCS=1

install:
  - composer install --prefer-dist --no-suggest
  - mkdir -p build/logs

script:
  - ./vendor/bin/phpunit --coverage-clover build/logs/clover.xml
  - |
    if [[ ${RUN_PHPCS} == 1 ]]; then
      ./vendor/bin/phpcs
    fi

after_script:
  - if [ $CODECLIMATE_REPO_TOKEN ]; then ./vendor/bin/test-reporter; fi;



Include PHP_CodeSniffer as part of the CI process
Include PHP_CodeSniffer as part of the CI process
