diff --git a/.travis.yml b/.travis.yml index 33bfe58..a3cd322 100644 --- a/.travis.yml +++ b/.travis.yml @@ -4,33 +4,34 @@ language: php os: - linux dist: bionic + +addons: + apt: + packages: + - subversion + services: - mysql php: - # TODO PHP 8.0 - '7.4' + # TODO + #- '8.0' cache: directories: - '${HOME}/.composer/cache' -# TODO maybe test building docs at some point - -addons: - apt: - packages: - - subversion - before_install: - mysql -e 'CREATE DATABASE IF NOT EXISTS test;' - mysql -e 'GRANT ALL PRIVILEGES ON test.* TO test@localhost IDENTIFIED BY "test";' + - composer self-update --1 install: - composer install --no-interaction --prefer-dist - DB_HOST=127.0.0.1 DB_NAME=test DB_USER=test DB_PASS=test bin/install-wp-tests.sh script: - - vendor/bin/phpunit - - ./vendor/bin/phpcs --standard=./phpcs.xml test/unit test/integration src - - vendor/bin/phpstan analyse + - composer run-script test + - composer run-script sniff + - composer run-script phpstan diff --git a/phpcs.xml b/phpcs.xml index 222ced3..1c356c4 100644 --- a/phpcs.xml +++ b/phpcs.xml @@ -4,20 +4,16 @@ - + - - - + + ./greg.php + ./src/ + ./test/unit/ + ./test/integration/ wp-content/ wp/ - vendor/* - test/themes - - - ./lib + vendor/