five-for-the-future/.travis.yml
Kelly Dwan 68d5c53c95
Tests: Move tests infrastructure, set up travis
Consolidates the composer files so we can run install once in travis.
2019-11-15 10:40:18 -05:00

20 lines
600 B
YAML

sudo: required
dist: trusty
language: php
php: 7.2
env: WP_VERSION=latest WP_MULTISITE=0 WP_CORE_DIR=/tmp/wordpress
install:
- bash bin/install-wp-tests.sh wporg_5ftf_test root '' localhost $WP_VERSION
- composer install
before_script:
- phpenv config-rm xdebug.ini
script:
- composer run-script test -- --version
- composer run-script test -- -c phpunit.xml.dist
- touch $TRAVIS_BUILD_DIR/tmp.php
- export CHANGED_FILES=$(git diff --name-only --diff-filter=AM $TRAVIS_BRANCH...HEAD | tr '\n' ' ')
- composer run-script phpcs $TRAVIS_BUILD_DIR/tmp.php $(echo $CHANGED_FILES) -- -n