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

Run PHPUnit jobs across multiple PHP versions #46510

Merged
merged 79 commits into from
Jan 16, 2023
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 Dec 13, 2022
6547f78
Add multiple php versions.
anton-vlasenko Dec 13, 2022
4bf84bb
Add multiple php versions.
anton-vlasenko Dec 13, 2022
1285d42
Define phpVersion as environment variable.
anton-vlasenko Dec 13, 2022
cd74382
Add phpunit tags for PHP 8.1 and 8.2.
anton-vlasenko Dec 13, 2022
20e6d53
Remove hyphen.
anton-vlasenko Dec 13, 2022
f192e2e
Nove PHPUnit tests to a separate file.
anton-vlasenko Dec 13, 2022
0da70ae
Disable `fail-fast`.
anton-vlasenko Dec 13, 2022
c3bbb6a
Update matrix.os.
anton-vlasenko Dec 13, 2022
9b6cd40
Install composer dependencies.
anton-vlasenko Dec 13, 2022
53180a4
Revert "Install composer dependencies."
anton-vlasenko Dec 13, 2022
b60db3d
Revert "Revert "Install composer dependencies.""
anton-vlasenko Dec 13, 2022
2a687ae
Fixing "no phpunit found" error.
aaroncampbell Dec 13, 2022
c161a74
Revert "Fixing "no phpunit found" error."
anton-vlasenko Dec 13, 2022
4381998
Add phpunit tags for PHP 8.1 and 8.2.
anton-vlasenko Dec 13, 2022
f340a41
Debug the phpunitImage.
anton-vlasenko Dec 14, 2022
aa50d13
Use correct composer version.
anton-vlasenko Dec 14, 2022
c67c5b6
Fix container name.
anton-vlasenko Dec 14, 2022
9575fc7
Don't modify package.json.
anton-vlasenko Dec 14, 2022
4d6bdd4
Don't install composer dependencies twice.
anton-vlasenko Dec 14, 2022
461200f
Need to prefix commands with npm run.
anton-vlasenko Dec 14, 2022
b299003
Add double dashes to pass flags to wp-env.
anton-vlasenko Dec 14, 2022
d722186
Fix name of the environment.
anton-vlasenko Dec 14, 2022
8c774d0
Add additional debug information.
anton-vlasenko Dec 14, 2022
4319bac
Composer dependencies should be installed after wp-env is intialised.
anton-vlasenko Dec 14, 2022
b245bc6
Fix wrong command.
anton-vlasenko Dec 14, 2022
6057268
Since the tests are currently run within the Docker containers where …
anton-vlasenko Dec 14, 2022
f8173c6
Fix path to the multisite.xml.
anton-vlasenko Dec 14, 2022
0b8dff9
Fix the test class to be compatible with PHP < 7.3.
anton-vlasenko Dec 14, 2022
2fbdcc4
Fix bug in WP_REST_Block_Pattern_Categories_Controller_Test::wpTearDo…
anton-vlasenko Dec 14, 2022
76fcd32
Remove incompatible PHP packages.
anton-vlasenko Dec 15, 2022
82745d8
Remove incompatible PHP packages.
anton-vlasenko Dec 15, 2022
db2044e
Update description.
anton-vlasenko Dec 15, 2022
460da7c
Remove incompatible PHP packages.
anton-vlasenko Dec 15, 2022
1f607b5
Remove incompatible PHP packages.
anton-vlasenko Dec 15, 2022
d90b2fc
Fix wrong matrix value.
anton-vlasenko Dec 15, 2022
61a096f
Remove incompatible PHP packages.
anton-vlasenko Dec 15, 2022
8232cd1
Don't remove polyfills.
anton-vlasenko Dec 15, 2022
5dfa520
Don't remove spathie package on PHP 7.2.
anton-vlasenko Dec 15, 2022
bc9af74
// strpos() doesn't support negative offset values on PHP prior to ve…
anton-vlasenko Dec 15, 2022
185f26a
Add cliPhpVersion config parameter.
anton-vlasenko Dec 15, 2022
118286f
Don't use custom commands to run the tests.
anton-vlasenko Dec 15, 2022
7abd2c3
Revert "Add cliPhpVersion config parameter."
anton-vlasenko Dec 15, 2022
a6d2aee
Don't use the phpunit docker-compose service.
anton-vlasenko Dec 15, 2022
5890fb6
Fix dynamic properties. PHP 8.2 doesn't support dynamic properties.
anton-vlasenko Dec 15, 2022
be706c6
Fix dynamic properties. PHP 8.2 doesn't support dynamic properties.
anton-vlasenko Dec 15, 2022
d44e9fa
Fix dynamic properties. PHP 8.2 doesn't support dynamic properties.
anton-vlasenko Dec 15, 2022
780e12e
Allow /.cache/.gitkeep files.
anton-vlasenko Dec 16, 2022
1cbe0ee
Add the .gitkeep file.
anton-vlasenko Dec 16, 2022
f1cb171
Add PHP Coding Stadnards.
anton-vlasenko Dec 16, 2022
2d5e7f0
Fix the if condition.
anton-vlasenko Dec 16, 2022
1636e2d
Fix path.
anton-vlasenko Dec 16, 2022
f9dfc91
Rename Core to Gutenberg.
anton-vlasenko Dec 20, 2022
10e5d0f
Add job's description.
anton-vlasenko Dec 20, 2022
31d5f22
Add a comment to explain why we need the /.cache folder.
anton-vlasenko Dec 20, 2022
5c92300
Add a comment to explain why we need complicated .gitignore rules.
anton-vlasenko Dec 20, 2022
c16e8e5
Fix grammar.
anton-vlasenko Dec 20, 2022
9ac9073
Revert accidental changes.
anton-vlasenko Dec 20, 2022
1b0d068
Revert accidental changes.
anton-vlasenko Dec 20, 2022
bb0f4b7
Allow manually triggering the workflows.
anton-vlasenko Dec 22, 2022
3c90728
Remove description.
anton-vlasenko Dec 22, 2022
220bf63
Let's not limit the job by path.
anton-vlasenko Dec 22, 2022
6f158a7
PHP 7.3 and 7.4 should use PHPUnit 9.
anton-vlasenko Dec 22, 2022
76a5d0e
Update the changelog.
anton-vlasenko Jan 12, 2023
c1bf302
1. Fix yaml synthax.
anton-vlasenko Dec 22, 2022
9c91766
In most repos, the convention is to have the if: above the run:.
anton-vlasenko Dec 22, 2022
571f5ee
Don't log the PHP version; this information is available in the "Set …
anton-vlasenko Dec 22, 2022
a4c17e4
Don't log the Composer version; this information is available in the …
anton-vlasenko Dec 22, 2022
8b7348b
1. Don't scan the unit tests twice.
anton-vlasenko Dec 22, 2022
c46a898
Fix the cs2pr report location.
anton-vlasenko Dec 22, 2022
2be51c6
Update the .gitignore rule description.
anton-vlasenko Dec 22, 2022
ac99768
Enable fast failing to save Github resources as proposed here: https:…
anton-vlasenko Jan 4, 2023
22bffeb
As the separate PHPCS run for the tests has been removed, this step s…
anton-vlasenko Jan 12, 2023
7cfdaae
Use the development php.ini file (to make any errors more obvious).
anton-vlasenko Jan 12, 2023
8546c9c
Use the development php.ini file (to make any errors more obvious).
anton-vlasenko Jan 12, 2023
9d0a477
Revert "Use the development php.ini file (to make any errors more obv…
anton-vlasenko Jan 12, 2023
2a371d8
Move the unit tests to unit-test.yml.
anton-vlasenko Jan 12, 2023
8eb3280
Change the description.
anton-vlasenko Jan 16, 2023
017ce16
Rename the job.
anton-vlasenko Jan 16, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Remove incompatible PHP packages.
  • Loading branch information
anton-vlasenko committed Jan 12, 2023
commit 1f607b5ef3874e71e1bee733a4a817c5f6e0e9bb
5 changes: 5 additions & 0 deletions .github/workflows/phpunit-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,10 @@ jobs:
php-version: '${{ matrix.php }}'
coverage: none

# This step is needed to ensure that Composer installs the correct versions of packages.
- name: Override PHP version in composer.json
run: composer config platform.php ${{ matrix.os }}

# Since Composer dependencies are installed using `composer update` and no lock file is in version control,
# passing a custom cache suffix ensures that the cache is flushed at least once per week.
- name: Install Composer dependencies
Expand All @@ -91,6 +95,7 @@ jobs:

- name: General debug information
run: |
php --version
npm --version
node --version
curl --version
Expand Down