Skip to content

Commit b3d4607

Browse files
Add support for module import based on input settings in action.yml
1 parent d4cfada commit b3d4607

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

action.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -105,6 +105,7 @@ runs:
105105
env:
106106
LocalTestPath: ${{ steps.paths.outputs.LocalTestPath }}
107107
WorkingDirectory: ${{ inputs.WorkingDirectory }}
108+
PSMODULE_TEST_PSMODULE_INPUT_Settings: ${{ inputs.Settings }}
108109
with:
109110
Debug: ${{ inputs.Debug }}
110111
Prerelease: ${{ inputs.Prerelease }}
@@ -115,3 +116,7 @@ runs:
115116
CodeCoverage_CoveragePercentTarget: 0
116117
Path: ${{ steps.paths.outputs.TestPath }}
117118
Run_Path: ${{ steps.paths.outputs.CodePath }}
119+
Prescript: |
120+
if ($env:PSMODULE_TEST_PSMODULE_INPUT_Settings -eq 'Module') {
121+
Import-Module -Name '${{ steps.paths.outputs.ModuleName }}' -RequiredVersion 999.0.0
122+
}

0 commit comments

Comments
 (0)