Initialize PSMA: one library-backed action dispatched by Mode#1
Open
Marius Storhaug (MariusStorhaug) wants to merge 1 commit into
Open
Initialize PSMA: one library-backed action dispatched by Mode#1Marius Storhaug (MariusStorhaug) wants to merge 1 commit into
Marius Storhaug (MariusStorhaug) wants to merge 1 commit into
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Initialize PSMA — one library-backed action, dispatched by
ModeThis lays the foundation for consolidating the framework's internal actions into a
single repository with a single lifecycle. It introduces one internal PowerShell
library that holds all framework action logic and one composite action whose
control script (
main.ps1) loads the library and dispatches on aModeinput.It replaces the fleet of one-capability action repositories (
Build-PSModule,Test-PSModule,Publish-PSModule,Resolve-PSModuleVersion,Get-PSModuleSettings,Document-PSModule,Get-PesterCodeCoverage,Get-PesterTestResults,Install-PSModuleHelpers) with one place to version, test,and release them together.
Design
publish logic lives in one module instead of being duplicated per action.
Write-PSMALog,Get-PSMAInput,Set-PSMAOutput,Get-PSMAModuleName) are defined once and used by every mode — this is whatsimplifies the individual action calls.
Initialize-PSMAis the shared bootstrap that replaces theInstall-PSModuleHelpersaction.Modes
SettingsGet-PSMASettingsGet-PSModuleSettingsVersionResolve-PSMAVersionResolve-PSModuleVersionBuildBuild-PSMAModuleBuild-PSModuleTestTest-PSMAModuleTest-PSModuleCodeCoverageGet-PSMACodeCoverageGet-PesterCodeCoverageTestResultsGet-PSMATestResultGet-PesterTestResultsDocumentBuild-PSMADocumentationDocument-PSModulePublishPublish-PSMAModulePublish-PSModuleTestability
Because the action and the library live in one repo, CI tests both at the branch:
uses: ./) forSettings,Version, andBuildand asserts the outputs and the built manifest.
Consumers
A caller picks the task with
Mode, otherwise nothing about how they invoke it changes:Not yet (follow-up)
Each mode function is a working skeleton with a
PORT FROM:marker; the real logicfrom each existing action is moved in as a follow-up (one PR per capability), the
generic actions (
GitHub-Script,Invoke-Pester,Invoke-ScriptAnalyzer) staystandalone, and the reusable workflows are re-pointed at
PSMAlast.