-
Notifications
You must be signed in to change notification settings - Fork 35
Consistent phpunit runners for local and CI #493
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
Open
kasparsd
wants to merge
71
commits into
fairpm:release_1.4.1
Choose a base branch
from
kasparsd:add-phpstan-fresh
base: release_1.4.1
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
71 commits
Select commit
Hold shift + click to select a range
a36e779
Add CI for linting
kasparsd 745af44
Per linter
kasparsd 3e3b634
Define known versions for min supported PHP 7.4
kasparsd bc5fc99
This already happens
kasparsd cba55da
Sync min required
kasparsd 68dfd1d
Use the existing file
kasparsd d9e2566
Keep the name
kasparsd d3859d3
Relax for Composer
kasparsd ba2d6fb
Lock at versions supported by min supported PHP
kasparsd 0a53643
Add the vendor
kasparsd 254cfae
Make it work with 7.4 by default
kasparsd ebf2198
Use wp-env for tests across the board
kasparsd e6d7481
Use the same shared dev env for running PHP stuff
kasparsd 6acddc6
Add a reusable npm run cli command to avoid repetition
kasparsd 400cef2
Add coverage reporting too
kasparsd 76d2895
Install deps
kasparsd 1a1e108
Ignore the warning for now
kasparsd 2a6e96b
Use the correct reporting script
kasparsd e54baf8
Use a reliable helper instead of constants
kasparsd 347bd8d
Always return a string
kasparsd ae20936
Bump limits
kasparsd 5ec58cf
To ensure we have all symbols for phpstan
kasparsd 85fe610
This already happens during add_key_rewrite_rule()
kasparsd 98f001e
Doesn’t accept any arguments
kasparsd f26cc35
Shoudn’t return during an action
kasparsd 0dee60b
Exclude phpunit caches
kasparsd 7e79a25
Per linter
kasparsd 127e604
Per linter
kasparsd 48e0bfa
Colocate all phpunit configs
kasparsd 43fecce
Cache between runs
kasparsd 13e1dc6
Also during phpcs and phpstan checks
kasparsd 4dd35da
Lock to known PHP 7.4 versions
kasparsd b973311
Use matrix generator for easier management
kasparsd 17d7b15
Use a name
kasparsd b01cdac
Install phpunit matching PHP and WP combo
kasparsd 8c46ac4
Redundant spaces
kasparsd 731a225
Better formatting
kasparsd 76fb78d
Not used
kasparsd aad3f6f
No need to escape it
kasparsd 2dcc95b
Skip installing optional plugins during phpunit runs
kasparsd b7531ee
Document development tooling
kasparsd 36e9787
Add schema
kasparsd e8cabea
Ignore the wp-env override
kasparsd 858a91d
account for newly added packages
kasparsd a5a646d
Match the plugin.php required PHP version
kasparsd 1ba9ec8
Match the model in other CI files
kasparsd dc65cfd
Update baseline to match the fixed issues
kasparsd 91fdd8d
Match the update project requirements
kasparsd c798a64
Rely on composer resolving the correctly binary from local deps first
kasparsd 100ce12
Bump wp-env
kasparsd f67eda5
Use a file to lock the Node version
kasparsd b21689d
Lock to PHP 8.0 as min
kasparsd cabe677
Consistent known version
kasparsd 99d9a0e
Ignore for ci purposes
kasparsd 4b8bc4d
Account for missing deps in wp-env
kasparsd f317ccd
Keep the existing structure
kasparsd ac60e9f
Reduce changeset
kasparsd a99fafb
Match the updated meta files
kasparsd 07bb649
Don’t include release instructions
kasparsd 5cbe232
Don’t release linter config
kasparsd 7ec0085
Run with WP core trunk too
kasparsd f8a2d44
Make it run on pull request to release branches too
kasparsd 8691ba0
No longer needed
kasparsd 660f68f
Try caching the wp-env home directory between runs
kasparsd 5764ec8
Bust the cache, include package.json since that has wp-env dep
kasparsd e4d7b37
Merge remote-tracking branch 'origin/release_1.4.1' into add-phpstan-…
kasparsd 02f6a79
Add WP 7.0 to the test matrix
kasparsd 98d6ff4
we need just 9.0 since php8 is now the min supported
kasparsd cd69584
Simplify now that PHP 8.0 is the min-supported
kasparsd 23bbd4d
call the same shared installer helper
kasparsd 2e47c6a
And the cli runner helper
kasparsd 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
There are no files selected for viewing
This file contains hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 @@ | ||
| 20 |
This file contains hidden or 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 hidden or 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
File renamed without changes.
This file contains hidden or 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,17 @@ | ||
| #!/usr/bin/env node | ||
|
|
||
| // PHP versions and their supported WP versions. | ||
| const supported = { | ||
| "8.0": [ "6.2", "6.3", "6.4", "6.5", "6.6", "6.7", "6.8", "6.9", "7.0" ], | ||
| "8.1": [ "6.2", "6.3", "6.4", "6.5", "6.6", "6.7", "6.8", "6.9", "7.0" ], | ||
| "8.2": [ "6.2", "6.3", "6.4", "6.5", "6.6", "6.7", "6.8", "6.9", "7.0" ], | ||
| "8.3": [ "6.4", "6.5", "6.6", "6.7", "6.8", "6.9", "7.0" ], | ||
| "8.4": [ "6.7", "6.8", "6.9", "7.0" ], | ||
| "8.5": [ "6.9", "7.0", "trunk" ], | ||
| }; | ||
|
|
||
| const include = Object.entries( supported ).flatMap( ( [ php, wps ] ) => | ||
| wps.map( ( wp ) => ( { "php-version": php, "wp-version": wp } ) ) | ||
| ); | ||
|
|
||
| process.stdout.write( JSON.stringify( { include } ) ); |
Oops, something went wrong.
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.
Uh oh!
There was an error while loading. Please reload this page.