feat: adopt hve-core PowerShell CI infrastructure#312
Merged
WilliamBerryiii merged 2 commits intomainfrom Apr 1, 2026
Merged
Conversation
Contributor
|
The title says "adopt hve-core PowerShell CI infrastructure" but the PR contains:
This makes thorough review impractical. Each of these is a distinct concern that should be independently reviewable. |
auyidi1
reviewed
Mar 27, 2026
24 tasks
Collaborator
|
I guess in addition to the changes, this seems to include a latest pull from ADO as well. Not sure this is your intention, happy to approve if that's the flow you'd want to take here, but wondering if it was by mistake. |
Member
Author
No it was not ... I'll fix this |
- add CIHelpers and LintingHelpers shared modules for CI abstraction - add Invoke-PSScriptAnalyzer with CI annotations and changed-files mode - upgrade Invoke-Pester with CI integration and structured output - add Get-ChangedTestFiles and pester.config for incremental testing - update workflow files to use script-based analyzer and Pester runner 🚀 - Generated by Copilot
f96b6ed to
9ad2ea8
Compare
- set Run.Exit to $false preventing premature process termination - pin Pester to RequiredVersion 5.7.1 preventing 6.x breakage - pin PSScriptAnalyzer to RequiredVersion 1.22.0 - fix artifact upload path to match working-directory layout - add missing -Path parameter to Invoke-Pester call - fix test summary resultsFile path in github-script step - add DefaultParameterSetName and Position=0 to Write-CIStepSummary - add PSScriptAnalyzer suppression attributes for approved patterns - add comment-based help to LintingHelpers module functions 🔧 - Generated by Copilot
Member
Author
|
@katriendg & @auyidi1 - this should be clear for re-review. |
katriendg
approved these changes
Apr 1, 2026
nguyena2
approved these changes
Apr 1, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Pull Request
Description
Modernize edge-ai's PowerShell CI infrastructure by adopting shared modules and script-based workflows from microsoft/hve-core. This replaces inline workflow logic with reusable PowerShell scripts backed by shared CI platform abstraction and file discovery modules.
What Changed
New shared modules:
scripts/ci/Modules/CIHelpers.psm1— CI platform abstraction layer (11 functions) supporting GitHub Actions, Azure DevOps, and local execution. Provides output setting, annotations, step summaries, and task result reporting.scripts/linting/Modules/LintingHelpers.psm1— File discovery utilities (Get-ChangedFilesFromGit,Get-FilesRecursive) for changed-file detection and recursive file scanning with exclusion patterns.New scripts:
scripts/linting/Invoke-PSScriptAnalyzer.ps1— Script-based PSScriptAnalyzer runner with CI annotations, changed-files-only mode, JSON results output, markdown summary, and soft-fail support.scripts/tests/Get-ChangedTestFiles.ps1— Changed test file detection via git diff for incremental test runs.scripts/tests/pester.config.ps1— Externalized Pester configuration factory supporting CI mode, code coverage, and tag filtering.Upgraded scripts:
scripts/Invoke-Pester.ps1— Full rewrite with CI integration (-CIswitch), code coverage support, changed-only mode, structured JSON output (test-summary.json, test-failures.json), recursive failure tree walking, and CI annotations for failures.Updated workflows:
.github/workflows/powershell-lint.yml— Replaced inline PSScriptAnalyzer logic with call toInvoke-PSScriptAnalyzer.ps1..github/workflows/resource-provider-pwsh-tests.yml— Updated to use upgradedInvoke-Pester.ps1with-CIflag..github/workflows/pr-validation.yml— Added concurrency control (cancel-in-progress), added dedicated Pester test job with-CI -ChangedOnlyflags and per-job least-privilege permissions.Review Fixes
Addressed all review comments from @auyidi1 and resolved CI build failures:
scripts/tests/pester.config.ps1$config.Run.Exit = $false— prevents the Pester process from exiting before post-processing (summary, annotations, artifact upload)scripts/Invoke-Pester.ps1-RequiredVersion '5.7.1'— prevents silent breakage from Pester 6.x API changesscripts/linting/Invoke-PSScriptAnalyzer.ps1-RequiredVersion '1.22.0'— ensures deterministic lint results across environments.github/workflows/resource-provider-pwsh-tests.yml${{ inputs.working-directory }}/${{ inputs.test-results-output }}/.github/workflows/resource-provider-pwsh-tests.yml-Path '.'toInvoke-Pester.ps1call.github/workflows/resource-provider-pwsh-tests.ymlresultsFilepath in github-script step to match actual output locationscripts/ci/Modules/CIHelpers.psm1DefaultParameterSetName = 'Content'andPosition = 0to fix positional parameter binding with multiple parameter setsscripts/ci/Modules/CIHelpers.psm1,scripts/linting/Modules/LintingHelpers.psm1[SuppressMessageAttribute]for approved patterns and comment-based helpRelated Issue
Relates to hve-core PowerShell CI infrastructure adoption initiative.
Type of Change
Implementation Details
Architecture
All scripts follow the hve-core pattern of shared module composition:
Breaking Changes
scripts/Invoke-Pester.ps1— Full rewrite with new parameter interface (-CI,-CodeCoverage,-ChangedOnly,-OutputPath,-Path,-ConfigPath). Old parameter interface no longer exists..github/workflows/powershell-lint.yml— Inline PSScriptAnalyzer steps replaced with script call..github/workflows/resource-provider-pwsh-tests.yml— Pester invocation updated to use-CIflag.Testing Performed
Validation performed:
Validation Steps
Import-Module ./scripts/ci/Modules/CIHelpers.psm1 -Force; Get-CIPlatformImport-Module ./scripts/linting/Modules/LintingHelpers.psm1 -Force; Get-Command -Module LintingHelperspwsh scripts/linting/Invoke-PSScriptAnalyzer.ps1pwsh scripts/Invoke-Pester.ps1Checklist
terraform fmton all Terraform codeterraform validateon all Terraform codeaz bicep formaton all Bicep codeaz bicep buildto validate all Bicep codemega-linter-runner)Additional Notes