Travis is an awesome tool and my go-to for Continuous Integration and Continuous Deployment. A quick win is to add a PHP linter:
before_script..: - if find . -name "*.php" ! -path "./vendor/*" -exec php -l {} \; | grep -v "No syntax errors detected"; then exit 1; fi
If you have a lot of files, that can be quite slow as it processes one file at a time. If we tweak the command a bit we can process 8 files at the same time:
before_script: - if find . -name "*.php" ! -path "./vendor/*" -print0 | xargs -0 -n 1 -P 8 php -l | grep -v "No syntax errors detected"; then exit 1; fi
This will lint your PHP files before executing your tests. It only outputs files that have an error. Files that are OK are skipped.