Skip to content

Commit 32b6dc2

Browse files
🩹 [Refactor]: Rename and restructure Test-SourceCode job to Test-PSModule-SourceCode and add Invoke-ScriptAnalyzer job for improved linting
1 parent 7832303 commit 32b6dc2

File tree

2 files changed

+20
-13
lines changed

2 files changed

+20
-13
lines changed

‎.github/workflows/Test-SourceCode.yml

Lines changed: 18 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -50,34 +50,40 @@ permissions:
5050
contents: read # to checkout the repo and create releases on the repo
5151

5252
jobs:
53-
Test-SourceCode:
53+
Test-PSModule-SourceCode:
5454
name: Test source code (${{ inputs.RunsOn }})
5555
if: ${{ !(contains(inputs.SkipTests, 'All') || contains(inputs.SkipTests, 'SourceCode') || contains(inputs.SkipTests, inputs.OS)) }}
5656
runs-on: ${{ inputs.RunsOn }}
5757
steps:
5858
- name: Checkout Code
5959
uses: actions/checkout@v4
6060

61-
- name: Debug
62-
if: ${{ inputs.Debug }}
63-
uses: PSModule/Debug@v0
64-
65-
- name: Initialize environment
66-
uses: PSModule/Initialize-PSModule@v1
61+
- name: Test source code
62+
id: test
63+
uses: PSModule/Test-PSModule@v3
6764
with:
6865
Debug: ${{ inputs.Debug }}
6966
Prerelease: ${{ inputs.Prerelease }}
7067
Verbose: ${{ inputs.Verbose }}
7168
Version: ${{ inputs.Version }}
69+
Path: ${{ inputs.Path }}
70+
Settings: SourceCode
7271

73-
- name: Test source code
72+
Invoke-ScriptAnalyzer-SourceCode:
73+
name: Lint source code (${{ inputs.RunsOn }})
74+
if: ${{ !(contains(inputs.SkipTests, 'All') || contains(inputs.SkipTests, 'SourceCode') || contains(inputs.SkipTests, inputs.OS)) }}
75+
runs-on: ${{ inputs.RunsOn }}
76+
steps:
77+
- name: Checkout Code
78+
uses: actions/checkout@v4
79+
80+
- name: Lint source code
7481
id: test
75-
uses: PSModule/Test-PSModule@v2
82+
uses: PSModule/Invoke-ScriptAnalyzer@v2
7683
with:
77-
Name: ${{ inputs.Name }}
78-
Path: ${{ inputs.Path }}
79-
TestType: SourceCode
8084
Debug: ${{ inputs.Debug }}
8185
Prerelease: ${{ inputs.Prerelease }}
8286
Verbose: ${{ inputs.Verbose }}
8387
Version: ${{ inputs.Version }}
88+
Path: ${{ inputs.Path }}
89+
Settings: SourceCode

‎.github/workflows/workflow.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -102,6 +102,7 @@ permissions:
102102

103103
jobs:
104104
TestSourceCode:
105+
name: Test source code
105106
strategy:
106107
matrix:
107108
include:
@@ -143,11 +144,11 @@ jobs:
143144
Path: ${{ inputs.Path }}
144145
ModulesOutputPath: ${{ inputs.ModulesOutputPath }}
145146
DocsOutputPath: ${{ inputs.DocsOutputPath }}
147+
SiteOutputPath: ${{ inputs.SiteOutputPath }}
146148
Debug: ${{ inputs.Debug }}
147149
Prerelease: ${{ inputs.Prerelease }}
148150
Verbose: ${{ inputs.Verbose }}
149151
Version: ${{ inputs.Version }}
150-
SiteOutputPath: ${{ inputs.SiteOutputPath }}
151152

152153
TestModule:
153154
if: ${{ needs.Build-Module.result == 'success' && !cancelled() }}

0 commit comments

Comments
 (0)