-
Notifications
You must be signed in to change notification settings - Fork 20
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 module dependency support #27
Comments
For now, I've elected to address this via additional documentation. I recognize that overall, module dependency is something that could stand to be improved. I have not settled on something beyond ensuring that required modules are added to the bootstrap file. Solutions like PSDepend or PSRequire seem overly clunky for solving this which is what other module generator solutions tend to lean on. I am open to discussion on ideas for longer term improvements. |
Did a quick PoC of using PSDepend with Catesta this morning. I haven't used PSDepend before, but I don't see it being a clunky solution. I found PSDepend to be extensible and simple. Open to discussing why/if there's any hesitance to use PSDepend. Artifacts: |
Adding that what was missing from the solution above was local dependency support. I've added this in my latest commit, linked below: TsekNet/TsekProfile@d3762dc#diff-e7215d569c39029991758de0706d2dcc (starting on like 269) |
For GitHub actions specifically, seeing this an option: https://github.com/marketplace/actions/powershell-module-cache |
Description
As part of getting started with Catesta, I had to dig through the code base to find where to import the module dependencies for my PowerShell module. I found the actions_bootstrap.ps1 file, and determined that I needed to add my module imports there.
For additional context, I was not able to initially start using Catesta until I added my module imports to the actions_bootstrap.ps1 script, as my tests were failing due to missing module dependencies.
I noticed a note in the build.ps1 script about dependency installation not being included, but was not able to find further documentation on that comment.
See this failed action for an example of the error I ran into, and this commit for how I resolved this issue.
Describe the solution you'd like
Ideally, during setup, Catesta would have an additional prompt that asks you which modules you would like to install as dependencies. This should add the required modules to the module manifest and the appropriate workflow script.
Describe any alternatives you've considered
Alternatively, update/add documentation on how to avoid this issue for users getting started with Catesta.
Additional context
Example broken action run: https://github.com/TsekNet/TsekProfile/runs/1078982174?check_suite_focus=true
Fixed issue in my repo: TsekNet/TsekProfile@2257337
The text was updated successfully, but these errors were encountered: