Skip to content

Commit

Permalink
Merge branch 'dev/6.0.0'
Browse files Browse the repository at this point in the history
  • Loading branch information
sudar committed Feb 22, 2019
2 parents b12cef4 + 2b52af6 commit e956077
Show file tree
Hide file tree
Showing 158 changed files with 28,848 additions and 5,726 deletions.
4 changes: 0 additions & 4 deletions .bowerrc

This file was deleted.

5 changes: 4 additions & 1 deletion .editorconfig
Expand Up @@ -17,5 +17,8 @@ indent_style = tab
indent_style = space
indent_size = 2

[*.md]
trim_trailing_whitespace = false

[{*.txt,wp-config-sample.php}]
end_of_line = crlf
end_of_line = crlf
3 changes: 3 additions & 0 deletions .scrutinizer.yml
@@ -0,0 +1,3 @@
tools:
external_code_coverage:
timeout: 600
2 changes: 0 additions & 2 deletions .styleci.yml
Expand Up @@ -78,7 +78,5 @@ enabled:
finder:
not-path:
- "libraries"
exclude:
- "tests"
name:
- "*.php"
125 changes: 125 additions & 0 deletions .travis.yml
@@ -0,0 +1,125 @@
# Ditch sudo and use containers.
# @link http://docs.travis-ci.com/user/migrating-from-legacy/#Why-migrate-to-container-based-infrastructure%3F
# @link http://docs.travis-ci.com/user/workers/container-based-infrastructure/#Routing-your-build-to-container-based-infrastructure
sudo: false
language: php

notifications:
email:
on_success: never
on_failure: change
slack:
secure: a6c/MoNQzAJV92EDvpZgrH9f3uwJ7ap7CbPQyx7E02viQWnbtuU25KdGXywV0ABKD/NhUCN/J9Hv8EXZThErgoIEtkIuedbD0+/iy2LrUipyuVjwVF8EuyarxdHQXDpMMUhQ6V5vcFZ4eK6qPQ9DzzdNmS267MGQv4N0/JUDFZ0=

cache:
directories:
- vendor
- node_modules
- "$HOME/.composer/cache"

matrix:
include:
# Run trunk in nightly and PHP 7.3
- php: nightly
env: WP_VERSION=trunk
- php: 7.3
env: WP_VERSION=trunk
- php: 7.2
env: WP_VERSION=latest
- php: 7.1
env: WP_VERSION=latest
- php: 7.0
env: WP_VERSION=latest
- php: 5.6
env: WP_VERSION=latest WP_MULTISITE=1 # For PHP 5.6 also run Multisite
- php: 5.3
env: WP_VERSION=latest
dist: precise
allow_failures:
- php: nightly
- php: 7.3 # Since tests are run with code coverage.
- php: 5.3
fast_finish: true

install:
- |
if [[ ${TRAVIS_PHP_VERSION:0:2} == "5." ]]; then
bash bin/install-wp-test-tools.sh
else
if [[ $TRAVIS_PHP_VERSION == 7.0 ]]; then
# Run npm install only for PHP 7.0 since we are going to test grunt and other npm related things only in PHP 7.0
npm install
else
# Run composer install only for PHP 7.1 or above. The dependencies are not compatible with PHP 5.x or PHP 7.0
composer install
fi
fi
before_script:
- export PATH="$HOME/.composer/vendor/bin:$PATH"
- |
if [[ $TRAVIS_PHP_VERSION != 7.3 ]]; then
# Disable x-debug to increase performance. x-debug is enabled only for PHP 7.3 to run code-coverage reports.
if [ -f ~/.phpenv/versions/$(phpenv version-name)/etc/conf.d/xdebug.ini ]; then
phpenv config-rm xdebug.ini
else
echo "xdebug.ini does not exist"
fi
fi
- |
if [[ $TRAVIS_PHP_VERSION != 7.0 ]]; then
bash bin/install-wp-tests.sh wordpress_test root '' localhost $WP_VERSION
fi
- |
if [[ ${TRAVIS_PHP_VERSION:0:2} == "5." ]]; then
composer global require "phpunit/phpunit=4.8.*|5.7.*"
fi
script:
- |
if [[ $TRAVIS_PHP_VERSION == 7.3 ]]; then
# Run code coverage for PHP 7.3 alone
npm run test:cover-coverage
# Ideally this should be in `after_script`. Since `fast_finish` is used `after_script` will not be called.
# So it is done as part of `script` itself.
wget https://scrutinizer-ci.com/ocular.phar
php ocular.phar code-coverage:upload --format=php-clover code-coverage/bulk-delete.clover
php vendor/bin/codacycoverage clover code-coverage/bulk-delete.clover
exit 0
fi
if [[ $TRAVIS_PHP_VERSION == 7.2 ]]; then
# Validate composer.json file
composer validate --no-check-all --strict
npm run test
exit 0
fi
if [[ $TRAVIS_PHP_VERSION == 7.1 ]]; then
# Check php syntax
npm run phpcs
npm run test
exit 0
fi
if [[ $TRAVIS_PHP_VERSION == 7.0 ]]; then
# Validate that grunt works
grunt vendor
grunt
exit 0
fi
if [[ ! -z "$WP_MULTISITE" ]] ; then
WP_MULTISITE=1 phpunit
else
phpunit
fi
53 changes: 24 additions & 29 deletions Gruntfile.js
Expand Up @@ -59,7 +59,7 @@ module.exports = function( grunt ) {
' * Licensed GPLv2+' +
' */\n',
mangle: {
except: ['jQuery']
reserved: ['jQuery', 'BulkWP']
}
},
files: {
Expand Down Expand Up @@ -106,53 +106,48 @@ module.exports = function( grunt ) {
copy: {
timepicker: {
files: [{
src : 'assets/vendor/jqueryui-timepicker-addon/dist/jquery-ui-timepicker-addon.min.js',
src : 'node_modules/jquery-ui-timepicker-addon/dist/jquery-ui-timepicker-addon.min.js',
dest: 'assets/js/jquery-ui-timepicker-addon.min.js'
},
{
src : 'assets/vendor/jqueryui-timepicker-addon/dist/jquery-ui-timepicker-addon.min.css',
src : 'node_modules/jquery-ui-timepicker-addon/dist/jquery-ui-timepicker-addon.min.css',
dest: 'assets/css/jquery-ui-timepicker-addon.min.css'
}]
},
select2: {
files: [{
src : 'assets/vendor/select2/dist/js/select2.min.js',
src : 'node_modules/select2/dist/js/select2.min.js',
dest: 'assets/js/select2.min.js'
},
{
src : 'assets/vendor/select2/dist/css/select2.min.css',
src : 'node_modules/select2/dist/css/select2.min.css',
dest: 'assets/css/select2.min.css'
}]
},
jquery_ui: {
files: [
{
src : 'node_modules/jquery-ui-built-themes/smoothness/jquery-ui.min.css',
dest: 'assets/css/jquery-ui-smoothness.min.css'
}
]
},
dist: {
files : [
{
expand: true,
src: [
'**',
'!dist/**',
'!AUTHORS.md',
'!docs/**',
'!assets-wp-repo/**',
'!code-coverage/**',
'!codeception.yml',
'!node_modules/**',
'!assets/vendor/**',
'!assets/js/src/**',
'assets/**',
'!assets/css/src/**',
'!Gruntfile.js',
'!bower.json',
'!package.json',
'!composer.json',
'!composer.lock',
'!phpcs.xml',
'!phpdoc.dist.xml',
'!phpunit.xml.dist',
'!bin/**',
'!tests/**',
'!.idea/**',
'!tags',
'!vendor/**'
'!assets/js/src/**',
'!assets/vendor/**',
'include/**',
'languages/**',
'vendor/sudar/wp-system-info/**',
'bulk-delete.php',
'HISTORY.md',
'load-bulk-delete.php',
'README.md'
],
dest: 'dist/'
}
Expand All @@ -164,7 +159,7 @@ module.exports = function( grunt ) {
require('time-grunt')(grunt);

grunt.registerTask('default', ['jshint:browser', 'concat', 'uglify', 'cssmin']);
grunt.registerTask('vendor', ['copy:timepicker', 'copy:select2']);
grunt.registerTask('vendor', ['copy:timepicker', 'copy:select2', 'copy:jquery_ui']);
grunt.registerTask('build', [ 'default', 'vendor', 'clean', 'copy:dist']);

grunt.util.linefeed = '\n';
Expand Down

0 comments on commit e956077

Please sign in to comment.