Skip to content

Conversation

@rodrigoprimo
Copy link
Collaborator

@rodrigoprimo rodrigoprimo commented May 14, 2025

This PR changes both the test.yml and the quicktest.yml workflows to run the tests on Windows as well. Before, the tests were executed only on Linux.

Installing xmllint on Windows using Chocolatey is a bit slow. We can look into ways to make it faster if needed.

Another thing to consider is whether we need to run all the test variations on Windows, as done in this PR. If not, this should speed up a bit the total time for all the checks to complete.

@rodrigoprimo
Copy link
Collaborator Author

I'm not totally sure, but I believe the required checks are defined in the GitHub repository settings, and those will need to be updated if this PR is approved as is, as the name of the checks changes to include the OS name.

Copy link
Member

@jrfnl jrfnl left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for setting this up @rodrigoprimo !

Two questions:

  1. Why was this pulled against stable ? I didn't look at it in detail when we discussed yesterday, but stable at this time contains no tests for which the OS makes a difference.
  2. Why are you adding runs against Windows for the quicktest-phpcs and test-phpcs jobs ?

@rodrigoprimo
Copy link
Collaborator Author

Thanks for checking this PR, @jrfnl!

Why was this pulled against stable ? I didn't look at it in detail when we discussed yesterday, but stable at this time contains no tests for which the OS makes a difference.

Maybe I misunderstood our conversation yesterday, but I thought you asked me to pull this PR against stable, so I didn't think much about it. That being said, stable contains the tests for PHPCSDebug that have special handling for different line endings. Example: https://github.com/PHPCSStandards/PHPCSDevTools/blob/stable/PHPCSDebug/Tests/Debug/TokenListJsTest.php#L163-L166. Considering this, maybe it makes sense to keep this PR against stable?

Why are you adding runs against Windows for the quicktest-phpcs and test-phpcs jobs ?

Because they contain the PHPCSDebug tests with special handling for different line endings as I detailed above. But maybe for some reason that I'm missing, you don't think it is necessary to run quicktest-phpcs and test-phpcs jobs against Windows just for this reason?

@jrfnl
Copy link
Member

jrfnl commented May 14, 2025

That being said, stable contains the tests for PHPCSDebug that have special handling for different line endings. Considering this, maybe it makes sense to keep this PR against stable?

No, the use of PHP_EOL alone in the sniff is not a reason for running the tests against Windows. In that case, we'd be testing PHP, not our own code.

@rodrigoprimo rodrigoprimo changed the base branch from stable to develop May 15, 2025 14:00
This commit changes both the test.yml and the quicktest.yml workflows to run the test-php and quicktest-php jobs (DevTools tests) on Windows as well. Before the tests were executed only on Linux.

Installing xmllint on Windows using Chocolatey is a bit slow. We can look into ways on how to make it faster if needed.
@rodrigoprimo rodrigoprimo changed the title GH Actions: run tests on Windows GH Actions: run DevTools tests on Windows May 15, 2025
Co-authored-by: Juliette <663378+jrfnl@users.noreply.github.com>
@rodrigoprimo
Copy link
Collaborator Author

I went ahead and updated the original commit to run only test-php and quicktest-php on Windows. I also added in a separate (to be squashed before merge) your suggestion to make the job name shorter.

I created a separate branch on my fork to verify that the quicktest is working as expected: https://github.com/rodrigoprimo/PHPCSDevTools/actions/runs/15047189089

This PR is ready for another review. Thanks.

@jrfnl
Copy link
Member

jrfnl commented May 16, 2025

Happy to merge this PR to develop. The thing to have a think about is whether this will need to be backported to stable if the docs tooling will be pulled to stable and if so, whether that will cause conflicts. If so, it might be better to pull it as part of the docs tooling PR, to be merged up into develop later.

Let me know what your thoughts are about this.

@jrfnl jrfnl added this to the 2.0.0 milestone May 17, 2025
@jrfnl jrfnl merged commit 4bb275f into PHPCSStandards:develop May 17, 2025
64 checks passed
@rodrigoprimo rodrigoprimo deleted the run-ci-on-windows branch May 19, 2025 10:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants