Skip to content

Commit 70f6e40

Browse files
committed
πŸ‘· [ci] Standardize CI test reporting to JUnit (testResults.junit.xml) and run coverage via npm
- πŸ§ͺ [test] Update scripts/Test-Coverage.ps1 to emit JUnit test results at testResults.junit.xml and set TestResult.OutputFormat = 'JUnitXml' - πŸ‘· [ci] Replace inline Invoke-Pester steps with npm run test:coverage -- -CI in .github/workflows/test.yml; update upload-artifact and Codecov test-results to use testResults.junit.xml - πŸ“ [docs] Add CODECOV_JUNIT_SETUP.md and update NPM_SCRIPTS.md and TESTING.md to reference testResults.junit.xml and JUnit export workflow - 🧹 [chore] Update .gitignore to include common test placeholders and new test artifact filenames (testResults.junit.xml / testResults.xml) - 🧹 [chore] Bump ModuleVersion and HelpInfo UICultureVersion to 2025.10.30.2007 and refresh manifest ReleaseNotes; reset generated dist release notes to Unreleased Signed-off-by: Nick2bad4u <20943337+Nick2bad4u@users.noreply.github.com>
1 parent 8ff260a commit 70f6e40

13 files changed

Lines changed: 614 additions & 87 deletions

β€Ž.github/workflows/test.ymlβ€Ž

Lines changed: 6 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -44,24 +44,14 @@ jobs:
4444
- name: Run Pester tests with coverage
4545
shell: powershell
4646
run: |
47-
Import-Module Pester
48-
$configuration = New-PesterConfiguration
49-
$configuration.Run.Path = './Tests'
50-
$configuration.Output.Verbosity = 'Detailed'
51-
$configuration.TestResult.Enabled = $true
52-
$configuration.TestResult.OutputPath = 'test-results.xml'
53-
$configuration.CodeCoverage.Enabled = $true
54-
$configuration.CodeCoverage.Path = './ColorScripts-Enhanced/*.psm1'
55-
$configuration.CodeCoverage.OutputPath = 'coverage.xml'
56-
$configuration.CodeCoverage.OutputFormat = 'JaCoCo'
57-
Invoke-Pester -Configuration $configuration
47+
npm run test:coverage -- -CI
5848
5949
- name: Upload test results
6050
if: always()
6151
uses: actions/upload-artifact@330a01c490aca151604b8cf639adc76d48f6c5d4 # v5.0.0
6252
with:
6353
name: test-results-windows-51
64-
path: test-results.xml
54+
path: testResults.junit.xml
6555

6656
- name: Upload coverage results
6757
if: always()
@@ -70,7 +60,6 @@ jobs:
7060
name: coverage-windows-51
7161
path: coverage.xml
7262

73-
7463
- name: Upload coverage to Codecov
7564
uses: codecov/codecov-action@5a1091511ad55cbe89839c7260b706298ca349f7 # v5.1.2
7665
with:
@@ -83,7 +72,7 @@ jobs:
8372
uses: codecov/test-results-action@v1
8473
with:
8574
token: ${{ secrets.CODECOV_TOKEN }}
86-
files: ./test-results.xml
75+
files: ./testResults.junit.xml
8776

8877
- name: Validate help topics
8978
shell: powershell
@@ -135,24 +124,14 @@ jobs:
135124
- name: Run Pester tests with coverage
136125
shell: pwsh
137126
run: |
138-
Import-Module Pester
139-
$configuration = New-PesterConfiguration
140-
$configuration.Run.Path = './Tests'
141-
$configuration.Output.Verbosity = 'Detailed'
142-
$configuration.TestResult.Enabled = $true
143-
$configuration.TestResult.OutputPath = 'test-results.xml'
144-
$configuration.CodeCoverage.Enabled = $true
145-
$configuration.CodeCoverage.Path = './ColorScripts-Enhanced/*.psm1'
146-
$configuration.CodeCoverage.OutputPath = 'coverage.xml'
147-
$configuration.CodeCoverage.OutputFormat = 'JaCoCo'
148-
Invoke-Pester -Configuration $configuration
127+
npm run test:coverage -- -CI
149128
150129
- name: Upload test results
151130
if: always()
152131
uses: actions/upload-artifact@330a01c490aca151604b8cf639adc76d48f6c5d4 # v5.0.0
153132
with:
154133
name: test-results-${{ matrix.os }}-pwsh
155-
path: test-results.xml
134+
path: testResults.junit.xml
156135

157136
- name: Upload coverage results
158137
if: always()
@@ -173,7 +152,7 @@ jobs:
173152
uses: codecov/test-results-action@v1
174153
with:
175154
token: ${{ secrets.CODECOV_TOKEN }}
176-
files: ./test-results.xml
155+
files: ./testResults.junit.xml
177156

178157
- name: Run script analyzer
179158
shell: pwsh

β€Ž.gitignoreβ€Ž

Lines changed: 107 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# File created using '.gitignore Generator' for Visual Studio Code: https://bit.ly/vscode-gig
2-
# Created by https://www.toptal.com/developers/gitignore/api/visualstudiocode,powershell,node,dotnetcore,autotools+strict,autotools,linux,macos,windows
3-
# Edit at https://www.toptal.com/developers/gitignore?templates=visualstudiocode,powershell,node,dotnetcore,autotools+strict,autotools,linux,macos,windows
2+
# Created by https://www.toptal.com/developers/gitignore/api/windows,visualstudiocode,powershell,node,macos,linux,dotnetcore,autotools+strict,autotools,test,testcomplete,testinfra
3+
# Edit at https://www.toptal.com/developers/gitignore?templates=windows,visualstudiocode,powershell,node,macos,linux,dotnetcore,autotools+strict,autotools,test,testcomplete,testinfra
44

55
### Autotools ###
66
# http://www.gnu.org/software/automake
@@ -287,6 +287,106 @@ dist
287287
# Exclude .NET assemblies from source
288288
*.dll
289289

290+
### Test ###
291+
### Ignore all files that could be used to test your code and
292+
### you wouldn't want to push
293+
294+
# Reference https://en.wikipedia.org/wiki/Metasyntactic_variable
295+
296+
# Most common
297+
*foo
298+
*bar
299+
*fubar
300+
*foobar
301+
*baz
302+
303+
# Less common
304+
*qux
305+
*quux
306+
*bongo
307+
*bazola
308+
*ztesch
309+
310+
# UK, Australia
311+
*wibble
312+
*wobble
313+
*wubble
314+
*flob
315+
*blep
316+
*blah
317+
*boop
318+
*beep
319+
320+
# Japanese
321+
*hoge
322+
*piyo
323+
*fuga
324+
*hogera
325+
*hogehoge
326+
327+
# Portugal, Spain
328+
*fulano
329+
*sicrano
330+
*beltrano
331+
*mengano
332+
*perengano
333+
*zutano
334+
335+
# France, Italy, the Netherlands
336+
*toto
337+
*titi
338+
*tata
339+
*tutu
340+
*pipppo
341+
*pluto
342+
*paperino
343+
*aap
344+
*noot
345+
*mies
346+
347+
# Other names that would make sense
348+
*tests
349+
*testsdir
350+
*testsfile
351+
*testsfiles
352+
*test
353+
*testdir
354+
*testfile
355+
*testfiles
356+
*testing
357+
*testingdir
358+
*testingfile
359+
*testingfiles
360+
*temp
361+
*tempdir
362+
*tempfile
363+
*tempfiles
364+
*tmp
365+
*tmpdir
366+
*tmpfile
367+
*tmpfiles
368+
*lol
369+
370+
### TestComplete ###
371+
# Test Complete ignore files: https://support.smartbear.com/viewarticle/68002/
372+
373+
# Tester-specific Settings
374+
*.tcCFGExtender
375+
*.tcLS
376+
377+
# Type library declarations
378+
*.tlb
379+
380+
# Log files
381+
*.tcLogs
382+
383+
# Backup files
384+
*.bak
385+
386+
### Testinfra ###
387+
__pycache__/
388+
.pytest_cache/
389+
290390
### VisualStudioCode ###
291391
.vscode/*
292392
!.vscode/settings.json
@@ -332,7 +432,7 @@ $RECYCLE.BIN/
332432
# Windows shortcuts
333433
*.lnk
334434

335-
# End of https://www.toptal.com/developers/gitignore/api/visualstudiocode,powershell,node,dotnetcore,autotools+strict,autotools,linux,macos,windows
435+
# End of https://www.toptal.com/developers/gitignore/api/windows,visualstudiocode,powershell,node,macos,linux,dotnetcore,autotools+strict,autotools,test,testcomplete,testinfra
336436

337437
# Custom rules (everything added below won't be overriden by 'Generate .gitignore File' if you use 'Update' option)
338438

@@ -346,6 +446,8 @@ node_modules/
346446
# Code coverage reports
347447
coverage.xml
348448
coverage-report/
349-
testResults.xml
350-
test-results.xml
449+
testResults.junit.xml
450+
testResults.junit.xml
351451
!dist
452+
testResults.xml
453+
testResults.nunit.xml

β€ŽColorScripts-Enhanced/ColorScripts-Enhanced.psd1β€Ž

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
RootModule = 'ColorScripts-Enhanced.psm1'
1212

1313
# Version number of this module.
14-
ModuleVersion = '2025.10.30.1631'
14+
ModuleVersion = '2025.10.30.2007'
1515

1616
# Supported PSEditions
1717
CompatiblePSEditions = @('Desktop', 'Core')
@@ -206,7 +206,7 @@ PERFECT FOR
206206

207207
# ReleaseNotes of this module
208208
ReleaseNotes = @'
209-
Version 2025.10.30.1631:
209+
Version 2025.10.30.2007:
210210
- Enhanced caching system with OS-wide cache in AppData
211211
- 6-19x performance improvement
212212
- Cache stored in centralized location

0 commit comments

Comments
Β (0)