Skip to content

Bashunit tests are not being run on Windows #1155

@NanoSector

Description

@NanoSector

Describe the bug

Bashunit tests introduced in #1126 are not being run on Windows because of issues with the action runners.

Code sample

Not applicable.

Custom ruleset

Not applicable.

To reproduce

Steps to reproduce the behavior:

  1. Enable the bashunit test step on Windows (in .github/workflows/test.yaml)
  2. Run the GitHub Actions pipeline
  3. Check the output of a Windows runner; it shows nothing for the bashunit step.

Expected behavior

The bashunit tests are run on Windows and show output.

Versions (please complete the following information)

Not applicable; the OS is Windows, but it is not directly related to phpcs/phpcbf or its standards.

Operating System Windows
PHP version Any
PHP_CodeSniffer version Any
Standard Not applicable
Install type Not applicable

Additional context

Snippet from jrfnl's comment:

Other than that, it looks like the tests aren't running/working on the Windows builds (example). The Linux jobs all show the testdox output, the Windows jobs don't show any output at all.

I'd expect the step to fail with a non-zero exit code if the tests couldn't run on Windows, preferably with some feedback on why it is failing.
This will probably need some debugging to figure out why the tests aren't running on Windows.
First thing I'd suggest to try, would be adding shell: bash to the step and see if that makes a difference.

Then, depending on whether the failure to run on Windows is related to PowerShell or due to an issue with BashUnit itself, you may also want to open an issue in the BashUnit repo about this.

Please confirm

  • I have searched the issue list and am not opening a duplicate issue.
  • I have read the Contribution Guidelines and this is not a support question.
  • I confirm that this bug is a bug in PHP_CodeSniffer and not in one of the external standards.
  • I have verified the issue still exists in the master branch of PHP_CodeSniffer.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions