Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
7d21d0f
commit 4268379
Showing
6 changed files
with
123 additions
and
94 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,2 @@ | ||
|
||
vendor/* | ||
/vendor/ | ||
/phpcs.xml |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,56 +1,72 @@ | ||
language: php | ||
dist: trusty | ||
|
||
notifications: | ||
email: | ||
on_success: never | ||
on_failure: change | ||
os: | ||
- linux | ||
|
||
branches: | ||
only: | ||
- master | ||
dist: bionic | ||
|
||
php: | ||
- 5.6 | ||
- 7.0 | ||
- 7.1 | ||
- 7.2 | ||
- 7.4 | ||
- 7.3 | ||
- 7.2 | ||
- 7.1 | ||
- nightly | ||
|
||
env: | ||
- WP_VERSION=latest WP_MULTISITE=0 | ||
- WP_VERSION=latest WP_MULTISITE=1 | ||
- WP_VERSION=latest WP_MULTISITE=0 PHPUNIT_VERSION="^5.6" | ||
- WP_VERSION=latest WP_MULTISITE=1 PHPUNIT_VERSION="^5.6" | ||
|
||
services: | ||
- mysql | ||
|
||
matrix: | ||
jobs: | ||
include: | ||
- php: 7.0 | ||
dist: xenial | ||
env: | ||
- WP_VERSION=latest WP_MULTISITE=0 PHPUNIT_VERSION="^5.6" | ||
- WP_VERSION=latest WP_MULTISITE=1 PHPUNIT_VERSION="^5.6" | ||
- php: 5.6 | ||
dist: xenial | ||
env: | ||
- WP_VERSION=latest WP_MULTISITE=0 PHPUNIT_VERSION="4.8.*" | ||
- WP_VERSION=latest WP_MULTISITE=1 PHPUNIT_VERSION="4.8.*" | ||
- name: "Coding Standars" | ||
php: 7.4 | ||
install: | ||
- composer require --dev wp-coding-standards/wpcs dealerdirect/phpcodesniffer-composer-installer | ||
script: | ||
- vendor/bin/phpcs | ||
- name: "Static Analysis" | ||
php: 7.4 | ||
install: | ||
- composer require --dev szepeviktor/phpstan-wordpress | ||
script: | ||
- vendor/bin/phpstan analyze | ||
allow_failures: | ||
- php: nightly | ||
|
||
before_script: | ||
- bash bin/install-wp-tests.sh wordpress_test root "" localhost $WP_VERSION | ||
- export PATH="$HOME/.composer/vendor/bin:$PATH" | ||
- | | ||
if [[ ${TRAVIS_PHP_VERSION:0:1} == "7" ]]; then | ||
composer global require "phpunit/phpunit=^5.6" | ||
else | ||
composer global require "phpunit/phpunit=4.8.*" | ||
fi | ||
- | | ||
composer global require wp-coding-standards/wpcs | ||
phpcs --config-set installed_paths $HOME/.composer/vendor/wp-coding-standards/wpcs | ||
- | | ||
if [[ ${TRAVIS_PHP_VERSION:0:3} == "7.3" ]]; then | ||
composer require "szepeviktor/phpstan-wordpress:^0.5.0" | ||
fi | ||
script: | ||
- phpcs --standard=phpcs.ruleset.xml $(find -name "*.php") | ||
- | | ||
if [[ ${TRAVIS_PHP_VERSION:0:3} == "7.3" ]]; then | ||
vendor/bin/phpstan analyze | ||
fi | ||
- phpunit | ||
branches: | ||
only: | ||
- master | ||
|
||
cache: | ||
directories: | ||
- $HOME/.composer/cache | ||
- "${HOME}/.composer/cache" | ||
|
||
before_install: | ||
- composer remove --dev stevegrunwell/wp-enforcer | ||
# Shim Composer's post-install-cmd script | ||
- install -T /dev/null vendor/bin/wp-enforcer | ||
|
||
install: | ||
- bin/install-wp-tests.sh wordpress_test root "" localhost "${WP_VERSION}" | ||
- composer global require --dev "phpunit/phpunit=${PHPUNIT_VERSION}" | ||
|
||
script: | ||
- "${HOME}/.composer/vendor/bin/phpunit" | ||
|
||
notifications: | ||
email: | ||
on_success: never | ||
on_failure: change |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
<?xml version="1.0"?> | ||
<ruleset name="WordPress Coding Standards for Plugins"> | ||
<description>Generally-applicable sniffs for WordPress plugins</description> | ||
|
||
<rule ref="WordPress-Core"/> | ||
<rule ref="WordPress-Docs"/> | ||
|
||
<file>./class-wp-bootstrap-navwalker.php</file> | ||
<file>./tests/</file> | ||
</ruleset> |