-
Notifications
You must be signed in to change notification settings - Fork 4.2k
{CI} enforce WinPS 5.1 AutoGen module validation and failure propagation #29545
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Draft
YangAn-microsoft
wants to merge
9
commits into
Azure:main
Choose a base branch
from
YangAn-microsoft:test/unicode-parse-issue
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Draft
Changes from 4 commits
Commits
Show all changes
9 commits
Select commit
Hold shift + click to select a range
19c7b46
Add Windows PowerShell 5.1 per-module tests in CI
YangAn-microsoft c7c5d6f
Address PR feedback for WinPS AutoGen validation
YangAn-microsoft 7cd1967
Fix pipeline script parsing and condition operators
YangAn-microsoft c58a6cc
Potential fix for pull request finding
YangAn-microsoft 13bad4d
Fix AutoGen root path resolution in test pipeline
YangAn-microsoft f744e93
Add platform detection for Windows PowerShell 5.1 test reporting
YangAn-microsoft 2a9ec48
Potential fix for pull request finding
YangAn-microsoft 41aa223
Use non-interactive WinPS invocation in CI test step
YangAn-microsoft 83a3fe2
Fix AutoGen script discovery and WinPS platform label
YangAn-microsoft File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Some comments aren't visible on the classic Files Changed page.
There are no files selected for viewing
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
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
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
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -34,22 +34,36 @@ steps: | |
| continueOnError: true | ||
|
|
||
| - pwsh: | | ||
| Install-Module -Name Pester -RequiredVersion 4.10.1 -Force | ||
| if ($IsWindows) { $sp = ";" } else { $sp = ":" } | ||
| $env:PSModulePath = $env:PSModulePath + $sp + (pwd).Path | ||
| $rootFolder = (Get-item $PWD).Parent.Parent | ||
| Get-ChildItem -File -Recurse test-module.ps1 | ForEach-Object { | ||
| Write-Host $_.Directory.FullName | ||
| cd $rootFolder | ||
| .\tools\ExecuteCIStep.ps1 -TestAutorest -AutorestDirectory $_.Directory.FullName | ||
| } | ||
| Install-Module -Name Pester -RequiredVersion 4.10.1 -Force | ||
| if ($IsWindows) { $sp = ";" } else { $sp = ":" } | ||
| $env:PSModulePath = $env:PSModulePath + $sp + (pwd).Path | ||
| $rootFolder = (Get-item $PWD).Parent.Parent | ||
| Get-ChildItem -File -Recurse test-module.ps1 | ForEach-Object { | ||
| Write-Host $_.Directory.FullName | ||
| Set-Location $rootFolder | ||
| .\tools\ExecuteCIStep.ps1 -TestAutorest -AutorestDirectory $_.Directory.FullName | ||
|
Comment on lines
+39
to
+44
|
||
| } | ||
| workingDirectory: 'artifacts/Debug' | ||
| displayName: 'Test for AutoGen Modules With PowerShell Core' | ||
| condition: and(succeeded(), eq('${{ parameters.testTarget }}', 'Test')) | ||
| continueOnError: true | ||
|
YangAn-microsoft marked this conversation as resolved.
|
||
| env: | ||
| PowerShellPlatform: ${{ parameters.powerShellPlatform }} | ||
|
|
||
| - powershell: | | ||
| Install-Module -Name Pester -RequiredVersion 4.10.1 -Force | ||
| $sp = [System.IO.Path]::PathSeparator | ||
| $env:PSModulePath = $env:PSModulePath + $sp + (pwd).Path | ||
| $rootFolder = (Get-item $PWD).Parent.Parent | ||
| Get-ChildItem -File -Recurse test-module.ps1 | ForEach-Object { | ||
| Write-Host $_.Directory.FullName | ||
| Set-Location $rootFolder | ||
| & .\tools\ExecuteCIStep.ps1 -TestAutorest -AutorestDirectory $_.Directory.FullName | ||
|
Comment on lines
+53
to
+64
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @copilot apply changes based on this feedback |
||
| } | ||
|
Comment on lines
+59
to
+65
|
||
| workingDirectory: 'artifacts/Debug' | ||
| displayName: 'Test for AutoGen Modules With Windows PowerShell 5.1' | ||
| condition: and(succeeded(), eq(variables['Agent.OS'], 'Windows_NT'), eq('${{ parameters.testTarget }}', 'Test')) | ||
|
|
||
| - task: PowerShell@2 | ||
| displayName: Analyze Test Coverage | ||
| inputs: | ||
|
|
||
Oops, something went wrong.
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.
Uh oh!
There was an error while loading. Please reload this page.