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

Add Windows PowerShell Support #22

Open
wants to merge 17 commits into
base: master
Choose a base branch
from

Conversation

natescherer
Copy link
Contributor

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
Copy link
Member

ebekker commented Nov 7, 2022

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

@natescherer
Copy link
Contributor Author

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

@ebekker
Copy link
Member

ebekker commented Nov 8, 2022

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
Copy link
Contributor Author

ebekker/pwsh-github-action-tools#8 has been created to update GitHubActions module.

@natescherer
Copy link
Contributor Author

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
Copy link
Contributor Author

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

@natescherer
Copy link
Contributor Author

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
Copy link
Contributor Author

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants