Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ci: update WP Core Tests workflow #4883

Merged
merged 2 commits into from
Sep 21, 2023
Merged

ci: update WP Core Tests workflow #4883

merged 2 commits into from
Sep 21, 2023

Conversation

sjinks
Copy link
Member

@sjinks sjinks commented Sep 21, 2023

This PR fixes the broken WP Core tests.

@sjinks sjinks self-assigned this Sep 21, 2023
@sjinks sjinks added [Status] In Progress [Type] Maintenance Support the development in this repo labels Sep 21, 2023
@codecov
Copy link

codecov bot commented Sep 21, 2023

Codecov Report

Merging #4883 (a51a6b7) into develop (9e4e16e) will increase coverage by 0.07%.
Report is 1 commits behind head on develop.
The diff coverage is n/a.

@@              Coverage Diff              @@
##             develop    #4883      +/-   ##
=============================================
+ Coverage      29.06%   29.13%   +0.07%     
  Complexity      4705     4705              
=============================================
  Files            276      276              
  Lines          20749    20749              
=============================================
+ Hits            6030     6045      +15     
+ Misses         14719    14704      -15     

see 7 files with indirect coverage changes

@sjinks sjinks force-pushed the update/core-tests branch 2 times, most recently from 7d8d3d4 to a7a00f4 Compare September 21, 2023 08:39
@sjinks
Copy link
Member Author

sjinks commented Sep 21, 2023

It looks like this is caused by a regression introduced in PHPUnit 9.6.13:

PHPUnit 9.6.12:

$ composer require --dev phpunit/phpunit:9.6.12
./composer.json has been updated
Running composer update phpunit/phpunit
Loading composer repositories with package information
Updating dependencies
Lock file operations: 0 installs, 1 update, 0 removals
  - Upgrading phpunit/phpunit (9.6.0 => 9.6.12)
Writing lock file
Installing dependencies from lock file (including require-dev)
Package operations: 0 installs, 1 update, 0 removals
  - Upgrading phpunit/phpunit (9.6.0 => 9.6.12): Extracting archive
Generating autoload files
25 packages you are using are looking for funding.
Use the `composer fund` command to find out more!
No security vulnerability advisories found

$ node ./tools/local-env/scripts/docker.js run php ./vendor/bin/phpunit --verbose -c phpunit.xml.dist --filter test_is_allowed_dir_should_return_true_if_open_basedir_is_set_and_path_is_allowed --debug
[+] Running 1/0
 ⠿ Container wordpress-develop-mysql-1  Running                                                                                                                                                                                                                                     0.0s
Installing...
Running as single site... To run multisite, use -c tests/phpunit/multisite.xml
Not running ajax tests. To execute these, use --group ajax.
Not running ms-files tests. To execute these, use --group ms-files.
Not running external-http tests. To execute these, use --group external-http.
PHPUnit 9.6.12 by Sebastian Bergmann and contributors.

Runtime:       PHP 7.4.33
Configuration: phpunit.xml.dist
Warning:       Your XML configuration validates against a deprecated schema.
Suggestion:    Migrate your XML configuration using "--migrate-configuration"!

Test 'Tests_Admin_WpAutomaticUpdater::test_is_allowed_dir_should_return_true_if_open_basedir_is_set_and_path_is_allowed' started
Test 'Tests_Admin_WpAutomaticUpdater::test_is_allowed_dir_should_return_true_if_open_basedir_is_set_and_path_is_allowed' ended


Time: 00:02.289, Memory: 160.50 MB

OK (1 test, 1 assertion)

PHPUnit 9.6.13:

$ composer require --dev phpunit/phpunit:9.6.13
./composer.json has been updated
Running composer update phpunit/phpunit
Loading composer repositories with package information
Updating dependencies
Lock file operations: 0 installs, 1 update, 0 removals
  - Upgrading phpunit/phpunit (9.6.12 => 9.6.13)
Writing lock file
Installing dependencies from lock file (including require-dev)
Package operations: 0 installs, 1 update, 0 removals
  - Upgrading phpunit/phpunit (9.6.12 => 9.6.13): Extracting archive
Generating autoload files
25 packages you are using are looking for funding.
Use the `composer fund` command to find out more!
No security vulnerability advisories found

$ node ./tools/local-env/scripts/docker.js run php ./vendor/bin/phpunit --verbose -c phpunit.xml.dist --filter test_is_allowed_dir_should_return_true_if_open_basedir_is_set_and_path_is_allowed --debug
[+] Running 1/0
 ⠿ Container wordpress-develop-mysql-1  Running                                                                                                                                                                                                                                     0.0s
Installing...
Running as single site... To run multisite, use -c tests/phpunit/multisite.xml
Not running ajax tests. To execute these, use --group ajax.
Not running ms-files tests. To execute these, use --group ms-files.
Not running external-http tests. To execute these, use --group external-http.
PHPUnit 9.6.13 by Sebastian Bergmann and contributors.

Runtime:       PHP 7.4.33
Configuration: phpunit.xml.dist
Warning:       Your XML configuration validates against a deprecated schema.
Suggestion:    Migrate your XML configuration using "--migrate-configuration"!

Test 'Tests_Admin_WpAutomaticUpdater::test_is_allowed_dir_should_return_true_if_open_basedir_is_set_and_path_is_allowed' started
Test 'Tests_Admin_WpAutomaticUpdater::test_is_allowed_dir_should_return_true_if_open_basedir_is_set_and_path_is_allowed' ended


Time: 00:02.337, Memory: 163.50 MB

There was 1 failure:

1) Tests_Admin_WpAutomaticUpdater::test_is_allowed_dir_should_return_true_if_open_basedir_is_set_and_path_is_allowed
Test was run in child process and ended unexpectedly

phpvfscomposer:///var/www/vendor/phpunit/phpunit/phpunit:106

@sjinks sjinks marked this pull request as ready for review September 21, 2023 10:41
@sjinks sjinks requested a review from a team as a code owner September 21, 2023 10:41
@sjinks sjinks merged commit 349ef36 into develop Sep 21, 2023
41 checks passed
@sjinks sjinks deleted the update/core-tests branch September 21, 2023 10:54
andrea-sdl pushed a commit that referenced this pull request Oct 19, 2023
* ci: update WP Core Tests workflow

* Downgrade PHPUnit to 9.6.12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant