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=latest - DEPENDENCIES=oldest notifications: slack: rooms: - SLACKNOTIFICATION on_success: change on_failure: always sudo: false cache: directories: - vendor - "$HOME/.composer/cache" before_install: - phpenv config-rm xdebug.ini - > 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} < resources/Database/Schema.sql; install: - > echo; if [ "$DEPENDENCIES" = "latest" ]; then echo "Installing the latest dependencies"; composer update --with-dependencies --prefer-stable --prefer-dist else echo "Installing the lowest dependencies"; composer update --with-dependencies --prefer-stable --prefer-dist --prefer-lowest fi; composer show; script: - > echo; echo "Validating the composer.json"; composer validate --no-check-all --no-check-lock --strict; - > echo; echo "Linting all PHP files"; find src/ tests/ public/ -name ''*.php'' -print0 | xargs -0 -n 1 -P 4 php -l; php -l bin/*; - > echo; echo "Running the unit tests"; vendor/bin/phpunit tests/Unit/; - > echo; echo "Running the integration tests"; vendor/bin/phpunit tests/Integration/; - > echo; echo "Running the system tests"; vendor/bin/phpunit tests/System/; - > echo; echo "Running the static analysis"; vendor/bin/phpstan analyse -l 5 bin/ src/ tests/ public/; - > echo; echo "Running PHPMD"; vendor/bin/phpmd src/ text config/PHPMD/rules.xml; - > echo; echo "Running PHP_CodeSniffer"; vendor/bin/phpcs --standard=config/PhpCodeSniffer/ bin/ src/ tests/ public/;
Name | Type | Size | Permission | Actions |
---|---|---|---|---|
.github | Folder | 0755 |
|
|
bin | Folder | 0755 |
|
|
config | Folder | 0755 |
|
|
docs | Folder | 0755 |
|
|
public | Folder | 0755 |
|
|
resources | Folder | 0755 |
|
|
src | Folder | 0755 |
|
|
tests | Folder | 0755 |
|
|
.gitignore | File | 192 B | 0644 |
|
.travis.yml | File | 1.89 KB | 0644 |
|
CHANGELOG.md | File | 1.35 KB | 0644 |
|
CODE_OF_CONDUCT.md | File | 3.15 KB | 0644 |
|
LICENSE | File | 33.71 KB | 0644 |
|
README.md | File | 6.42 KB | 0644 |
|
composer.json | File | 3.84 KB | 0644 |
|
phpunit.xml.dist | File | 521 B | 0644 |
|