Skip to content

Commit a57f0c1

Browse files
🩹 [Patch]: Refactor TestData JSON formatting in Process-PSModule.yml (#28)
This pull request updates the way test environment variables are passed to the workflow in `.github/workflows/Process-PSModule.yml`. The main change is to the formatting and encoding of the `TestData` field, specifically for how variables are referenced. **Workflow variable handling:** * Changed the `TestData` field to reference `TEST_VARIABLE` using `"${{ vars.TEST_VARIABLE }}"` instead of `toJSON(vars.TEST_VARIABLE)`, simplifying the value assignment and making it consistent with secret referencing. * Reformatted the `TestData` JSON for improved readability by expanding it to multiple lines.
1 parent 9351753 commit a57f0c1

7 files changed

Lines changed: 8 additions & 60 deletions

File tree

‎.github/workflows/Process-PSModule.yml‎

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,5 +31,11 @@ jobs:
3131
secrets:
3232
APIKEY: ${{ secrets.APIKEY }}
3333
TestData: >-
34-
{ "secrets": { "TEST_SECRET": "${{ secrets.TEST_SECRET }}" },
35-
"variables": { "TEST_VARIABLE": ${{ toJSON(vars.TEST_VARIABLE) }} } }
34+
{
35+
"secrets": {
36+
"TEST_SECRET": "${{ secrets.TEST_SECRET }}"
37+
},
38+
"variables": {
39+
"TEST_VARIABLE": "${{ vars.TEST_VARIABLE }}"
40+
}
41+
}

‎src/functions/public/IndexSection/Get-IndexSectionTest.ps1‎

Lines changed: 0 additions & 21 deletions
This file was deleted.

‎src/functions/public/IndexSection/index.md‎

Lines changed: 0 additions & 5 deletions
This file was deleted.

‎src/functions/public/NamedSection/Get-NamedSectionTest.ps1‎

Lines changed: 0 additions & 21 deletions
This file was deleted.

‎src/functions/public/NamedSection/NamedSection.md‎

Lines changed: 0 additions & 5 deletions
This file was deleted.
File renamed without changes.

‎tests/PSModuleTest.Tests.ps1‎

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -24,10 +24,4 @@ Describe 'Module' {
2424
It 'Function: Test-PSModuleTest' {
2525
Test-PSModuleTest -Name 'World' | Should -Be 'Hello, World!'
2626
}
27-
It 'Function: Get-IndexSectionTest' {
28-
Get-IndexSectionTest -Name 'World' | Should -Be 'Hello, World!'
29-
}
30-
It 'Function: Get-NamedSectionTest' {
31-
Get-NamedSectionTest -Name 'World' | Should -Be 'Hello, World!'
32-
}
3327
}

0 commit comments

Comments
 (0)