-
Notifications
You must be signed in to change notification settings - Fork 4.3k
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
Run PHPUnit jobs across multiple PHP versions #46510
Merged
Merged
Changes from 1 commit
Commits
Show all changes
79 commits
Select commit
Hold shift + click to select a range
b555d9d
Add a small change to create a PR.
anton-vlasenko 6547f78
Add multiple php versions.
anton-vlasenko 4bf84bb
Add multiple php versions.
anton-vlasenko 1285d42
Define phpVersion as environment variable.
anton-vlasenko cd74382
Add phpunit tags for PHP 8.1 and 8.2.
anton-vlasenko 20e6d53
Remove hyphen.
anton-vlasenko f192e2e
Nove PHPUnit tests to a separate file.
anton-vlasenko 0da70ae
Disable `fail-fast`.
anton-vlasenko c3bbb6a
Update matrix.os.
anton-vlasenko 9b6cd40
Install composer dependencies.
anton-vlasenko 53180a4
Revert "Install composer dependencies."
anton-vlasenko b60db3d
Revert "Revert "Install composer dependencies.""
anton-vlasenko 2a687ae
Fixing "no phpunit found" error.
aaroncampbell c161a74
Revert "Fixing "no phpunit found" error."
anton-vlasenko 4381998
Add phpunit tags for PHP 8.1 and 8.2.
anton-vlasenko f340a41
Debug the phpunitImage.
anton-vlasenko aa50d13
Use correct composer version.
anton-vlasenko c67c5b6
Fix container name.
anton-vlasenko 9575fc7
Don't modify package.json.
anton-vlasenko 4d6bdd4
Don't install composer dependencies twice.
anton-vlasenko 461200f
Need to prefix commands with npm run.
anton-vlasenko b299003
Add double dashes to pass flags to wp-env.
anton-vlasenko d722186
Fix name of the environment.
anton-vlasenko 8c774d0
Add additional debug information.
anton-vlasenko 4319bac
Composer dependencies should be installed after wp-env is intialised.
anton-vlasenko b245bc6
Fix wrong command.
anton-vlasenko 6057268
Since the tests are currently run within the Docker containers where …
anton-vlasenko f8173c6
Fix path to the multisite.xml.
anton-vlasenko 0b8dff9
Fix the test class to be compatible with PHP < 7.3.
anton-vlasenko 2fbdcc4
Fix bug in WP_REST_Block_Pattern_Categories_Controller_Test::wpTearDo…
anton-vlasenko 76fcd32
Remove incompatible PHP packages.
anton-vlasenko 82745d8
Remove incompatible PHP packages.
anton-vlasenko db2044e
Update description.
anton-vlasenko 460da7c
Remove incompatible PHP packages.
anton-vlasenko 1f607b5
Remove incompatible PHP packages.
anton-vlasenko d90b2fc
Fix wrong matrix value.
anton-vlasenko 61a096f
Remove incompatible PHP packages.
anton-vlasenko 8232cd1
Don't remove polyfills.
anton-vlasenko 5dfa520
Don't remove spathie package on PHP 7.2.
anton-vlasenko bc9af74
// strpos() doesn't support negative offset values on PHP prior to ve…
anton-vlasenko 185f26a
Add cliPhpVersion config parameter.
anton-vlasenko 118286f
Don't use custom commands to run the tests.
anton-vlasenko 7abd2c3
Revert "Add cliPhpVersion config parameter."
anton-vlasenko a6d2aee
Don't use the phpunit docker-compose service.
anton-vlasenko 5890fb6
Fix dynamic properties. PHP 8.2 doesn't support dynamic properties.
anton-vlasenko be706c6
Fix dynamic properties. PHP 8.2 doesn't support dynamic properties.
anton-vlasenko d44e9fa
Fix dynamic properties. PHP 8.2 doesn't support dynamic properties.
anton-vlasenko 780e12e
Allow /.cache/.gitkeep files.
anton-vlasenko 1cbe0ee
Add the .gitkeep file.
anton-vlasenko f1cb171
Add PHP Coding Stadnards.
anton-vlasenko 2d5e7f0
Fix the if condition.
anton-vlasenko 1636e2d
Fix path.
anton-vlasenko f9dfc91
Rename Core to Gutenberg.
anton-vlasenko 10e5d0f
Add job's description.
anton-vlasenko 31d5f22
Add a comment to explain why we need the /.cache folder.
anton-vlasenko 5c92300
Add a comment to explain why we need complicated .gitignore rules.
anton-vlasenko c16e8e5
Fix grammar.
anton-vlasenko 9ac9073
Revert accidental changes.
anton-vlasenko 1b0d068
Revert accidental changes.
anton-vlasenko bb0f4b7
Allow manually triggering the workflows.
anton-vlasenko 3c90728
Remove description.
anton-vlasenko 220bf63
Let's not limit the job by path.
anton-vlasenko 6f158a7
PHP 7.3 and 7.4 should use PHPUnit 9.
anton-vlasenko 76a5d0e
Update the changelog.
anton-vlasenko c1bf302
1. Fix yaml synthax.
anton-vlasenko 9c91766
In most repos, the convention is to have the if: above the run:.
anton-vlasenko 571f5ee
Don't log the PHP version; this information is available in the "Set …
anton-vlasenko a4c17e4
Don't log the Composer version; this information is available in the …
anton-vlasenko 8b7348b
1. Don't scan the unit tests twice.
anton-vlasenko c46a898
Fix the cs2pr report location.
anton-vlasenko 2be51c6
Update the .gitignore rule description.
anton-vlasenko ac99768
Enable fast failing to save Github resources as proposed here: https:…
anton-vlasenko 22bffeb
As the separate PHPCS run for the tests has been removed, this step s…
anton-vlasenko 7cfdaae
Use the development php.ini file (to make any errors more obvious).
anton-vlasenko 8546c9c
Use the development php.ini file (to make any errors more obvious).
anton-vlasenko 9d0a477
Revert "Use the development php.ini file (to make any errors more obv…
anton-vlasenko 2a371d8
Move the unit tests to unit-test.yml.
anton-vlasenko 8eb3280
Change the description.
anton-vlasenko 017ce16
Rename the job.
anton-vlasenko File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Composer dependencies should be installed after wp-env is intialised.
- Loading branch information
commit 4319bac88bc7f31cc3dc6018cf017482738471c8
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
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is all this necessary or mostly useful while developing this branch? Same question for the Docker debug info step below.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's not necessary, but it's worthwhile.
E.g., it helps to confirm which version of Composer and/or PHP are used when installing Composer packages and running PHPUnit.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm asking because we don't currently do this for our other workflows, and it's a fair amount of noise, and some duplication (e.g. PHP and composer versions are already available through the matrix and through the PHP install step).
It's not problematic, per se, just curious why it's here as it seems like a step (to remove this debug logging) that might have been overlooked before prepping for final merge into
trunk
.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We actually do this.
Yes, they are through the matrix, but we cannot be sure that the CI jobs use these specific versions (until we log them).
Also, in the matrix, we only specify major and minor PHP versions (the same way it's implemented in Core).
The logging allows us to know the exact PHP version (including the point release) used when running particular CI jobs.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That information is already available via the
setup-php
step.Jonathan and me actually discussed removing a lot of this kind of debug noise from the WP Core workflows recently as the information is already available within the workflow.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've removed logging Composer and PHP versions.
cb3ee089ee66b68af28305833e5868f7d517454d
2dfb8452e972553650ac309e497cb0fee252be15