Your IP : 216.73.216.97


Current Path : /var/www/clients/client3/web2/web/lists/base/
Upload File :
Current File : /var/www/clients/client3/web2/web/lists/base/.travis.yml

language: php

php:
- 7.0
- 7.1
- 7.2

services:
- mysql

env:
  global:
  - PHPLIST_DATABASE_NAME=phplist PHPLIST_DATABASE_USER=travis PHPLIST_DATABASE_PASSWORD=''
  matrix:
  - DEPENDENCIES=current
  - DEPENDENCIES=latest
  - DEPENDENCIES=oldest

sudo: false

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

before_install:
- phpenv config-rm xdebug.ini

install:
- >
  echo;
  if [ "$DEPENDENCIES" = "latest" ]; then
    echo "Installing the latest dependencies";
    composer update --with-dependencies --prefer-stable --prefer-dist
  elif [ "$DEPENDENCIES" = "oldest" ]; then
    echo "Installing the lowest dependencies";
    composer update --with-dependencies --prefer-stable --prefer-dist --prefer-lowest
  else
    echo "Installing the current dependencies from composer.lock";
    composer install
  fi;
  composer show;

before_script:
- >
  echo;
  echo "Creating the database and importing the database schema";
  mysql -e "CREATE DATABASE ${PHPLIST_DATABASE_NAME};";
  mysql -u root -e "GRANT ALL ON ${PHPLIST_DATABASE_NAME}.* TO '${PHPLIST_DATABASE_USER}'@'%';";
  mysql ${PHPLIST_DATABASE_NAME} < vendor/phplist/core/resources/Database/Schema.sql;

script:
- >
  echo;
  echo "Validating that composer.lock and composer.json are in sync";
  composer validate --no-check-all --strict;

- >
  echo;
  echo "Linting all PHP files";
  find src/ tests/ -name '*.php' -print0 | xargs -0 -n 1 -P 4 php -l;

- >
  echo;
  echo "Running the integration tests";
  vendor/bin/phpunit tests/Integration/;

- >
  echo;
  echo "Running the static analysis";
  vendor/bin/phpstan analyse -l 5 src/ tests/;

- >
  echo;
  echo "Running PHPMD";
  vendor/bin/phpmd src/ text vendor/phplist/core/config/PHPMD/rules.xml;

- >
  echo;
  echo "Running PHP_CodeSniffer";
  vendor/bin/phpcs --standard=vendor/phplist/core/config/PhpCodeSniffer/ src/ tests/;