Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/develop'
Browse files Browse the repository at this point in the history
  • Loading branch information
kasparsd committed Aug 31, 2024
2 parents 89a12df + ecd82f4 commit d082e1a
Show file tree
Hide file tree
Showing 13 changed files with 2,844 additions and 2,401 deletions.
5 changes: 4 additions & 1 deletion .eslintrc.json
Original file line number Diff line number Diff line change
@@ -1,11 +1,14 @@
{
"env": {
"browser": true
},
"extends": "plugin:@wordpress/eslint-plugin/es5",
"overrides": [
{
"files": [
"Gruntfile.js"
],
"extends": "plugin:@wordpress/eslint-plugin/recommended"
"extends": "plugin:@wordpress/eslint-plugin/recommended-with-formatting"
}
]
}
41 changes: 41 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
name: Lint and Test

on: push

jobs:

test:
name: Test and Lint
runs-on: ubuntu-20.04
strategy:
matrix:
php-versions: ['5.6', '7.4', '8.0']
steps:
- name: Checkout
uses: actions/checkout@v2

- name: Setup Node
uses: actions/setup-node@v2
with:
node-version: '14'

- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php-versions }}
coverage: xdebug

- name: Install tooling
run: npm install

- name: Lint
run: npm run lint

- name: Test
run: npm run test

- name: Check mess
run: npm run mess -- -- --ignore-violations-on-exit

- name: Build
run: npm run build
1 change: 1 addition & 0 deletions .nvmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
14
34 changes: 0 additions & 34 deletions .travis.yml

This file was deleted.

28 changes: 6 additions & 22 deletions Gruntfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,9 @@ module.exports = function( grunt ) {
const pluginVersion = getPluginVersion( 'widget-context.php' );

if ( ! pluginVersion ) {
grunt.warn( 'Failed to parse the plugin version in the plugin file.' );
grunt.warn(
'Failed to parse the plugin version in the plugin file.'
);
}

pkgConfig.version = pluginVersion;
Expand Down Expand Up @@ -134,25 +136,7 @@ module.exports = function( grunt ) {
},
} );

grunt.registerTask(
'build', [
'clean',
'copy',
'readmeMdToTxt',
]
);

grunt.registerTask(
'deploy', [
'build',
'wp_deploy:all',
]
);

grunt.registerTask(
'deploy-trunk', [
'build',
'wp_deploy:trunk',
]
);
grunt.registerTask( 'build', [ 'clean', 'copy', 'readmeMdToTxt' ] );
grunt.registerTask( 'deploy', [ 'build', 'wp_deploy:all' ] );
grunt.registerTask( 'deploy-trunk', [ 'build', 'wp_deploy:trunk' ] );
};
2 changes: 1 addition & 1 deletion assets/js/widget-context.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/* global jQuery, document */
/* global jQuery */
jQuery( document ).ready( function( $ ) {
function showHideControls( widgetId ) {
var condition = $( '#widget-context-' + widgetId + ' .wc-field-select-condition select' ).val();
Expand Down
15 changes: 8 additions & 7 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,13 +24,14 @@
},
"require-dev": {
"10up/wp_mock": "^0.2.0",
"mockery/mockery": "^0.9",
"php-coveralls/php-coveralls": "^2.1.0",
"phpcompatibility/php-compatibility": "^9.2",
"phpmd/phpmd": "^2.7",
"phpunit/phpunit": "^5",
"wp-coding-standards/wpcs": "^2.1",
"wpsh/local": "^0.2.3"
"mockery/mockery": "^0.9.5",
"php-coveralls/php-coveralls": "^2.4",
"phpcompatibility/php-compatibility": "^9.3",
"phpmd/phpmd": "^2.10",
"phpunit/phpunit": "^5.7",
"wp-coding-standards/wpcs": "^2.3",
"wpsh/local": "^0.2.3",
"yoast/phpunit-polyfills": "^1.0"
},
"autoload": {
"classmap": [
Expand Down
Loading

0 comments on commit d082e1a

Please # to comment.