five-for-the-future/.travis.yml
Kelly Dwan 03949905c0
Tests: Update infrastructure & add travis config (#100)
* Tests: Move tests infrastructure, set up travis

Consolidates the composer files so we can run install once in travis.

* Return empty array if no values are $_POST'ed to the form

Fixes an issue with tests + null values in logs

* Clean up some naming & create helper functions for tests

* Debug travis

* Remove debug

* Fix notices on form

* Turn on multisite flag
2019-11-15 17:40:53 -05:00

17 lines
552 B
YAML

sudo: required
dist: trusty
language: php
php: 7.2
env: WP_VERSION=latest WP_MULTISITE=1 WP_CORE_DIR=/tmp/wordpress
install:
- bash bin/install-wp-tests.sh wporg_5ftf_test root '' localhost $WP_VERSION
- composer install
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