Skip to content

Commit 4e5d875

Browse files
🪲 [Fix]: Restore use of GITHUB_TOKEN and Prescript on module tests (#161)
## Description This pull request reverts changes to the `.github/workflows/Test-ModuleLocal.yml` file to restore testing capabilities and module loading performance. Details: * Restored the `GITHUB_TOKEN` environment variable mapping, allowing it to be used in tests once more. * Restored the `Prescript` step to preload the module with a specific version, optimizing module loading during Pester tests.
1 parent dc04f94 commit 4e5d875

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

‎.github/workflows/Test-ModuleLocal.yml‎

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -114,6 +114,7 @@ jobs:
114114
TEST_USER_ORG_FG_PAT: ${{ secrets.TEST_USER_ORG_FG_PAT }}
115115
TEST_USER_USER_FG_PAT: ${{ secrets.TEST_USER_USER_FG_PAT }}
116116
TEST_USER_PAT: ${{ secrets.TEST_USER_PAT }}
117+
GITHUB_TOKEN: ${{ github.token }} # Used in tests!
117118
with:
118119
Debug: ${{ inputs.Debug }}
119120
Prerelease: ${{ inputs.Prerelease }}
@@ -129,3 +130,5 @@ jobs:
129130
Path: ${{ inputs.TestPath }}
130131
Run_Path: ${{ steps.import-module.outputs.path }}
131132
WorkingDirectory: ${{ inputs.WorkingDirectory }}
133+
Prescript: | # This is to speed up module loading in Pester.
134+
Import-Module -Name '${{ steps.import-module.outputs.name }}' -RequiredVersion 999.0.0

0 commit comments

Comments
 (0)