Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
138 changes: 0 additions & 138 deletions .github/scripts/Expose-TestData.ps1

This file was deleted.

5 changes: 4 additions & 1 deletion .github/workflows/AfterAll-ModuleLocal.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,12 +31,15 @@ jobs:
persist-credentials: false
fetch-depth: 0

- name: Install-PSModuleHelpers
uses: PSModule/Install-PSModuleHelpers@8bfb84d557755c67d9b5643efe573bdcae4c1a4a # v1.0.9

- name: Expose caller-provided test data
shell: pwsh
env:
PSMODULE_TEST_DATA: ${{ secrets.TestData }}
run: |
./.github/scripts/Expose-TestData.ps1
Import-TestData

- name: Run AfterAll Teardown Scripts
if: always()
Expand Down
5 changes: 4 additions & 1 deletion .github/workflows/BeforeAll-ModuleLocal.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,12 +31,15 @@ jobs:
persist-credentials: false
fetch-depth: 0

- name: Install-PSModuleHelpers
uses: PSModule/Install-PSModuleHelpers@8bfb84d557755c67d9b5643efe573bdcae4c1a4a # v1.0.9

- name: Expose caller-provided test data
shell: pwsh
env:
PSMODULE_TEST_DATA: ${{ secrets.TestData }}
run: |
./.github/scripts/Expose-TestData.ps1
Import-TestData

- name: Run BeforeAll Setup Scripts
uses: PSModule/GitHub-Script@8083ec1f733f00357ee4d0db0c6056686e483bc0 # v1.9.0
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/Build-Site.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ jobs:
fetch-depth: 0

- name: Install-PSModuleHelpers
uses: PSModule/Install-PSModuleHelpers@68e8ca76be679bfcb7099aed8cffa911c4ab72af # v1.0.8
uses: PSModule/Install-PSModuleHelpers@8bfb84d557755c67d9b5643efe573bdcae4c1a4a # v1.0.9

- name: Download docs artifact
uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/Plan.yml
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ jobs:
ImportantFilePatterns: ${{ inputs.ImportantFilePatterns }}

- name: Resolve-Version
uses: PSModule/Resolve-PSModuleVersion@d53326c7687d20a7949d457fccd71223856b1890 # v1.1.0
uses: PSModule/Resolve-PSModuleVersion@8d1dac7f326a45ba08060c1e24a5dd6f6f00b3ab # v1.1.4
id: Resolve-Version
env:
Comment thread
MariusStorhaug marked this conversation as resolved.
GH_TOKEN: ${{ github.token }}
Expand Down
16 changes: 8 additions & 8 deletions .github/workflows/Test-ModuleLocal.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,21 +36,21 @@ jobs:
persist-credentials: false
fetch-depth: 0

- name: Expose caller-provided test data
shell: pwsh
env:
PSMODULE_TEST_DATA: ${{ secrets.TestData }}
run: |
./.github/scripts/Expose-TestData.ps1

- name: Download module artifact
uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1
with:
name: module
path: ${{ fromJson(inputs.Settings).WorkingDirectory }}/outputs/module

- name: Install-PSModuleHelpers
uses: PSModule/Install-PSModuleHelpers@68e8ca76be679bfcb7099aed8cffa911c4ab72af # v1.0.8
uses: PSModule/Install-PSModuleHelpers@8bfb84d557755c67d9b5643efe573bdcae4c1a4a # v1.0.9
Comment thread
MariusStorhaug marked this conversation as resolved.

- name: Expose caller-provided test data
shell: pwsh
env:
PSMODULE_TEST_DATA: ${{ secrets.TestData }}
run: |
Import-TestData

- name: Import-Module
id: import-module
Expand Down
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -489,7 +489,8 @@ Notes:
Names must match `^[A-Za-z_][A-Za-z0-9_]*$` and must not override reserved variables such as `PATH`,
`CI`, `GITHUB_*`, `RUNNER_*` or `ACTIONS_*`.
- The `TestData` validation, masking and environment export logic is shared by the ModuleLocal workflows
through `.github/scripts/Expose-TestData.ps1`.
through the [`PSModule/Install-PSModuleHelpers`](https://github.com/PSModule/Install-PSModuleHelpers)
action, which installs the `Import-TestData` command each workflow runs to expose the values.
- Reference secrets as `"${{ secrets.<name> }}"` (quoted, directly) rather than
`toJSON(secrets.<name>)`. The direct form keeps CodeQL's *excessive secrets exposure* check happy and
works for single-line secret values. It cannot carry values that contain `"`, `\` or newlines, so
Expand Down
Loading