zyborg / pester-tests-report

GitHub Action to run Pester tests and generate report attached to Workflow Run
MIT License
40 stars 13 forks source link

Add Windows PowerShell Support #22

Open natescherer opened 1 year ago

natescherer commented 1 year ago

Hello! I've been tinkering for a while and I've figured out a way to add support for testing inside Windows PowerShell in addition to PowerShell 7.

You can see an example of a run that tests on both PowerShell 7 and Windows PowerShell here: https://github.com/natescherer/ChangelogManagement/actions/runs/3402497039

This does, however, make some fairly major changes to this action, namely converting from being a NodeJS action to a Composite action, and removing the dependency on the GitHubActions module, which requires PowerShell 7+.

Thoughts? I'd understand if you don't necessarily want to accept changes this big; would be happy to maintain this as my own fork and contribute fixes upstream where possible.

Thanks!

ebekker commented 1 year ago

Yikes! That is a big change. Have you considered possibly updating the GHActions module so that it would work with Windows PowerShell instead?

natescherer commented 1 year ago

I'm not opposed if you're willing to accept that update!

ebekker commented 1 year ago

Absolutely, I don't have any problems with making GitHubActions Windows PowerShell friendly. In fact I took a quick looks, I don't know if there's anything in there that's explicitly unfriendly to Windows PowerShell, it may be as simple as updating the manifest to declare compatibility.

natescherer commented 1 year ago

https://github.com/ebekker/pwsh-github-action-tools/pull/8 has been created to update GitHubActions module.

natescherer commented 1 year ago

Okay, use of the newly-updated GitHubActions module has been restored, ran a test run with it and everything looks good, feel free to check it out here: https://github.com/nateschererorg/pesterplayground/actions/runs/3445793732

natescherer commented 1 year ago

Hi @ebekker, just checking in to see what you think about this PR. Thanks!

natescherer commented 1 year ago

Hi @ebekker, just checking back in on this one. GitHub is now forcibly making this action use node16 and throwing warnings about it, this PR would fix that issue by switching to composite.

natescherer commented 10 months ago

Added one bugfix (System.Web needs explicitly loaded in 5.1) and one new feature (showing PowerShell Version & Edition in report).