Skip to content

Move Mono.Cecil into TCPK/lib/Cecil/ so IL prover survives Install-Mo… #3

Move Mono.Cecil into TCPK/lib/Cecil/ so IL prover survives Install-Mo…

Move Mono.Cecil into TCPK/lib/Cecil/ so IL prover survives Install-Mo… #3

Workflow file for this run

name: ci
on:
push:
branches: [main]
pull_request:
jobs:
windows:
name: import + pester (windows-latest)
runs-on: windows-latest
timeout-minutes: 15
steps:
- name: Checkout
uses: actions/checkout@v4
# STEP 1 is the gate. If the module cannot load, every one of the two prod bugs this
# class of check catches (invalid regex compiled by -match, a mangled Save-TcpkJson pipeline
# from a bad textual migration) shows up as a parse error right here and stops the run.
- name: Import-Module
shell: pwsh
run: |
$ErrorActionPreference = 'Stop'
Import-Module ./TCPK/TCPK.psd1 -Force -Verbose
$exported = @(Get-Command -Module TCPK).Count
Write-Host "TCPK loaded, $exported exported command(s)"
if ($exported -lt 200) { throw "TCPK exported only $exported commands, expected ~268" }
# STEP 2 runs the shipped tests. Many are cross-platform pure logic (byte pattern, byte
# diff, byte search, entropy, ETW analysers over synthetic records, tamper engine),
# some are Windows-only (WMI, registry, ETW capture, admin-gated). Pester will report both.
# Not gated with continue-on-error: red is the point.
- name: Invoke-Pester
shell: pwsh
run: |
$ErrorActionPreference = 'Stop'
if (-not (Get-Module -ListAvailable Pester | Where-Object Version -ge '5.0.0')) {
Install-Module Pester -MinimumVersion 5.0.0 -Force -Scope CurrentUser -SkipPublisherCheck
}
Import-Module Pester -MinimumVersion 5.0.0 -Force
$config = New-PesterConfiguration
$config.Run.Path = './TCPK/Tests'
$config.Run.Exit = $true
$config.Output.Verbosity = 'Detailed'
$config.TestResult.Enabled = $true
$config.TestResult.OutputPath = 'pester-results.xml'
Invoke-Pester -Configuration $config
- name: Upload Pester results
if: always()
uses: actions/upload-artifact@v4
with:
name: pester-results
path: pester-results.xml
if-no-files-found: ignore