-
Notifications
You must be signed in to change notification settings - Fork 26
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Loading status checks…
Release v2.2.4 (PR #948)
Release v2.2.4
Showing
146 changed files
with
2,238 additions
and
2,977 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 |
---|---|---|
@@ -0,0 +1,39 @@ | ||
name: PHP Stan lint | ||
|
||
on: | ||
pull_request: | ||
branches: | ||
- trunk | ||
- develop | ||
- branch-* | ||
- feature/* | ||
- enhancement/* | ||
|
||
jobs: | ||
run: | ||
runs-on: ${{ matrix.operating-system }} | ||
|
||
strategy: | ||
fail-fast: false | ||
matrix: | ||
operating-system: [ubuntu-latest] | ||
php-versions: ['8.2'] | ||
|
||
name: WPRocket lint with PHP Stan. PHP ${{ matrix.php-versions }} on ${{ matrix.operating-system }}. | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
|
||
- name: Setup PHP | ||
uses: shivammathur/setup-php@v2 | ||
with: | ||
php-version: ${{ matrix.php-versions }} | ||
coverage: none # XDebug can be enabled here 'coverage: xdebug' | ||
tools: composer:v2 | ||
|
||
- name: Install dependencies | ||
run: composer install --prefer-dist --no-interaction --no-scripts | ||
|
||
- name: Lint with PHP Stan | ||
run: composer run-stan -- --error-format=github | ||
|
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,69 +1,69 @@ | ||
name: Unit/Integration tests | ||
|
||
on: | ||
pull_request: | ||
branches: | ||
- trunk | ||
- develop | ||
- branch-* | ||
pull_request: | ||
branches: | ||
- trunk | ||
- develop | ||
- branch-* | ||
|
||
jobs: | ||
run: | ||
runs-on: ${{ matrix.operating-system }} | ||
run: | ||
runs-on: ${{ matrix.operating-system }} | ||
|
||
strategy: | ||
fail-fast: false | ||
matrix: | ||
operating-system: [ubuntu-latest] | ||
php-versions: ['7.4'] | ||
wp-versions: ['latest'] | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
operating-system: [ubuntu-latest] | ||
php-versions: ['8.0', '8.1', '8.2'] | ||
wp-versions: ['latest'] | ||
|
||
name: WP ${{ matrix.wp-versions }} with PHP ${{ matrix.php-versions }} on ${{ matrix.operating-system }}. | ||
name: WP ${{ matrix.wp-versions }} with PHP ${{ matrix.php-versions }} on ${{ matrix.operating-system }}. | ||
|
||
env: | ||
WP_TESTS_DIR: "/tmp/tests/phpunit" | ||
WP_CORE_DIR: "/tmp/wordpress-develop" | ||
IMAGIFY_TESTS_API_KEY: ${{ secrets.IMAGIFY_TESTS_API_KEY }} | ||
env: | ||
WP_TESTS_DIR: "/tmp/tests/phpunit" | ||
WP_CORE_DIR: "/tmp/wordpress-develop" | ||
IMAGIFY_TESTS_API_KEY: ${{ secrets.IMAGIFY_TESTS_API_KEY }} | ||
|
||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v2 | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v2 | ||
|
||
- name: Setup PHP | ||
uses: shivammathur/setup-php@v2 | ||
with: | ||
php-version: ${{ matrix.php-versions }} | ||
coverage: none # XDebug can be enabled here 'coverage: xdebug' | ||
tools: composer:v2, phpunit | ||
- name: Setup PHP | ||
uses: shivammathur/setup-php@v2 | ||
with: | ||
php-version: ${{ matrix.php-versions }} | ||
coverage: none # XDebug can be enabled here 'coverage: xdebug' | ||
tools: composer:v2, phpunit | ||
|
||
- name: Start mysql service | ||
run: sudo /etc/init.d/mysql start | ||
- name: Start mysql service | ||
run: sudo /etc/init.d/mysql start | ||
|
||
- name: Setup problem matchers for PHP | ||
run: echo "::add-matcher::${{ runner.tool_cache }}/php.json" | ||
- name: Setup problem matchers for PHP | ||
run: echo "::add-matcher::${{ runner.tool_cache }}/php.json" | ||
|
||
- name: Setup problem matchers for PHPUnit | ||
run: echo "::add-matcher::${{ runner.tool_cache }}/phpunit.json" | ||
- name: Setup problem matchers for PHPUnit | ||
run: echo "::add-matcher::${{ runner.tool_cache }}/phpunit.json" | ||
|
||
- name: Get composer cache directory | ||
id: composercache | ||
run: echo "::set-output name=dir::$(composer config cache-files-dir)" | ||
- name: Get composer cache directory | ||
id: composercache | ||
run: echo "::set-output name=dir::$(composer config cache-files-dir)" | ||
|
||
- name: Cache dependencies | ||
uses: actions/cache@v2 | ||
with: | ||
path: ${{ steps.composercache.outputs.dir }} | ||
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.json') }} | ||
restore-keys: ${{ runner.os }}-composer- | ||
- name: Cache dependencies | ||
uses: actions/cache@v2 | ||
with: | ||
path: ${{ steps.composercache.outputs.dir }} | ||
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.json') }} | ||
restore-keys: ${{ runner.os }}-composer- | ||
|
||
- name: Install dependencies | ||
run: composer install --prefer-dist --no-interaction --no-scripts | ||
- name: Install dependencies | ||
run: composer install --prefer-dist --no-interaction --no-scripts --ignore-platform-reqs | ||
|
||
- name: Install tests | ||
run: bash bin/install-wp-tests.sh wordpress_test root root 127.0.0.1:3306 ${{ matrix.wp-versions }} | ||
- name: Install tests | ||
run: bash bin/install-wp-tests.sh wordpress_test root root 127.0.0.1:3306 ${{ matrix.wp-versions }} | ||
|
||
- name: Mysql8 auth plugin workaround | ||
run: sudo mysql -u root -proot -e "ALTER USER 'root'@'localhost' IDENTIFIED WITH mysql_native_password BY 'root';" | ||
- name: Mysql8 auth plugin workaround | ||
run: sudo mysql -u root -proot -e "ALTER USER 'root'@'localhost' IDENTIFIED WITH mysql_native_password BY 'root';" | ||
|
||
- name: Test | ||
run: composer run-tests | ||
- name: Test | ||
run: composer run-tests |
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
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 |
---|---|---|
|
@@ -8,3 +8,4 @@ | |
composer.lock | ||
package-lock.json | ||
/_dev/node_modules | ||
.phpunit.result.cache |
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
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,8 @@ | ||
<?php | ||
if ( ! class_exists( 'GFCommon' ) ) { | ||
class GFForms{ | ||
public static function is_gravity_page() { | ||
return true; | ||
} | ||
} | ||
} |
27 changes: 27 additions & 0 deletions
27
Tests/Fixtures/classes/ThirdParty/Plugins/gravityForms.php
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,27 @@ | ||
<?php | ||
|
||
return [ | ||
'test_data' => [ | ||
'testShouldReturnStylesAndScriptWhenConflictModeIsOn' => [ | ||
'config' => [ | ||
'is_plugin_active' => true, | ||
'filter' => 'gform_noconflict_styles', | ||
], | ||
'expected' => [ | ||
'styles' => [ | ||
'imagify-admin-bar', | ||
'imagify-admin', | ||
'imagify-notices', | ||
'imagify-pricing-modal', | ||
], | ||
'scripts' => [ | ||
'imagify-admin-bar', | ||
'imagify-admin', | ||
'imagify-notices', | ||
'imagify-pricing-modal', | ||
'imagify-sweetalert', | ||
] | ||
], | ||
], | ||
] | ||
]; |
Oops, something went wrong.