Skip to content

Commit 223cc90

Browse files
committed
chore: ✨ Update GitHub Actions workflow and spell-check configuration
* Updated `actions/checkout` to version 4 * Added caching for PowerShell modules using `psmodulecache` * Improved module dependency handling in the workflow * Added `plaster` to the spell-checker ignore list in `cspell.json`
1 parent 3a1fc4c commit 223cc90

3 files changed

Lines changed: 25 additions & 16 deletions

File tree

.github/workflows/PesterReports.yml

Lines changed: 22 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,11 @@
1+
# spell-checker:ignore potatoqualitee psdepend psmodulecache
12
name: PesterReports
23
# Controls when the action will run.
34
on:
45
# Triggers the workflow on push or pull request events but only for the master branch
56
push:
67
branches: [ master ]
78
pull_request:
8-
branches: [ master ]
9-
109
# Allows you to run this workflow manually from the Actions tab
1110
workflow_dispatch:
1211

@@ -21,25 +20,34 @@ jobs:
2120
os: [ubuntu-latest, windows-latest, macOS-latest]
2221
# Steps represent a sequence of tasks that will be executed as part of the job
2322
steps:
24-
- uses: actions/checkout@v2
25-
# Setup Build Helpers
26-
- name: SetupBuildHelpers
23+
- uses: actions/checkout@v4
24+
- name: Install and cache PSDepend
25+
id: psdepend
26+
uses: potatoqualitee/psmodulecache@v6.2.1
27+
with:
28+
modules-to-cache: PSDepend:0.3.8
29+
- name: Determine modules to cache
2730
shell: pwsh
31+
id: modules-to-cache
2832
run: |
29-
Install-Module BuildHelpers -Scope CurrentUser -Force | Out-Null
30-
Install-Module PowerShellBuild -Scope CurrentUser -Force | Out-Null
31-
Install-Module PSScriptAnalyzer -Scope CurrentUser -Force | Out-Null
32-
Install-Module platyPS -Scope CurrentUser -Force | Out-Null
33+
$dependencies = Get-Dependency
34+
$f = $dependencies | ?{ $_.DependencyType -eq 'PSGalleryModule' } | %{ "{0}:{1}" -F $_.DependencyName, $_.Version}
35+
Write-Output "::set-output name=ModulesToCache::$($f -join ', ')"
36+
- name: Install and cache PowerShell modules
37+
id: psmodulecache
38+
uses: potatoqualitee/psmodulecache@v6.2.1
39+
with:
40+
modules-to-cache: ${{ steps.modules-to-cache.outputs.ModulesToCache }}
41+
shell: pwsh
3342
- name: Test
3443
shell: pwsh
35-
run: |
36-
./build.ps1 -Task Test
44+
run: ./build.ps1 -Task Test
3745
- name: Upload Unit Test Results
3846
if: always()
39-
uses: actions/upload-artifact@v2
47+
uses: actions/upload-artifact@v4
4048
with:
4149
name: Unit Test Results (OS ${{ matrix.os }})
42-
path: ./tests/Out/testResults.xml
50+
path: ./tests/out/testResults.xml
4351

4452
publish-test-results:
4553
name: "Publish Unit Tests Results"
@@ -55,6 +63,6 @@ jobs:
5563
path: artifacts
5664

5765
- name: Publish Unit Test Results
58-
uses: EnricoMi/publish-unit-test-result-action@v1
66+
uses: EnricoMi/publish-unit-test-result-action@v2
5967
with:
6068
files: artifacts/**/*.xml

Plaster/Plaster.psm1

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
1+
# spell-checker:ignore Multichoice Assigments
22
# Import localized data
33
data LocalizedData {
44
# culture="en-US"

cspell.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,8 @@
1414
"defaultlocale",
1515
"testoutputfile",
1616
"frommodule",
17-
"minimumversion"
17+
"minimumversion",
18+
"plaster",
1819
],
1920
"ignoreWords": [],
2021
"import": []

0 commit comments

Comments
 (0)