language: php

php:
  - 7.1.3
  - 7.2
  - 7.3
  - 7.4

env:
  - NODE_RELEASE=10.x

addons:
  apt:
    packages:
      # Cypress dependency
      - libgconf-2-4

cache:
  directories:
    # cache Cypress binary
    - ~/.cache

before_script:
  - composer self-update
  - sudo rm -rf ~/.nvm - curl -sL "https://deb.nodesource.com/setup_${NODE_RELEASE}" | sudo -E bash -
  - sudo apt-get install -y nodejs
  - cp configuration_sample.php configuration.php

install:
  - composer install --no-interaction
  - npm install

script:
  - vendor/bin/phpunit --coverage-clover=coverage.xml
  - npm run lint
  - npm run test:e2e

after_success:
  - bash <(curl -s https://codecov.io/bash)

