[release/v7.4] Refactor: Centralize xUnit tests into reusable workflow and remove legacy verification#26864
Merged
adityapatwardhan merged 1 commit intoPowerShell:release/v7.4from Feb 20, 2026
Conversation
…gacy verification (PowerShell#26243) Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: TravisEz13 <10873629+TravisEz13@users.noreply.github.com>
Contributor
There was a problem hiding this comment.
Pull request overview
This PR is a backport of #26243 to the release/v7.4 branch, refactoring xUnit test execution from an inline CI build step into a dedicated reusable workflow. The primary goals are to improve test retryability (tests can be independently retried using GitHub Actions' retry button) and visibility (clearer test results and logs as separate job artifacts). This change has already been successfully validated and merged to master, v7.6, and v7.5 release branches.
Changes:
- Creates new reusable workflow
.github/workflows/xunit-tests.ymlthat builds PowerShell and runs xUnit tests independently - Removes legacy xUnit test execution from
.github/actions/build/ci/action.ymlcomposite action - Deletes
.github/actions/test/verify_xunit/action.ymlverification action (tests now fail immediately instead of delayed verification) - Updates all three CI workflows (Linux, Windows, macOS) to use the new reusable workflow
- Adds documentation files for build prerequisites and troubleshooting
Reviewed changes
Copilot reviewed 11 out of 11 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
.github/workflows/xunit-tests.yml |
New reusable workflow that independently builds PowerShell and runs xUnit tests with proper git configuration and artifact uploads |
.github/workflows/windows-ci.yml |
Replaces verify_xunit job with independent xunit_tests job calling new reusable workflow, removes ci_build dependency |
.github/workflows/macos-ci.yml |
Replaces verify_xunit job with independent xunit_tests job calling new reusable workflow, changes runner from ubuntu to macos-15-large |
.github/workflows/linux-ci.yml |
Replaces verify_xunit job with independent xunit_tests job calling new reusable workflow |
.github/actions/build/ci/action.yml |
Removes xUnit test execution steps and artifact uploads (now handled by dedicated workflow) |
.github/actions/test/verify_xunit/action.yml |
Deleted - legacy verification no longer needed as tests fail immediately |
.github/instructions/workflow-prerequisites.md |
New documentation for required prerequisites before building PowerShell |
.github/instructions/troubleshooting-builds.md |
New documentation for common build issues and solutions |
.github/instructions/start-psbuild-basics.md |
New documentation for basic Start-PSBuild usage |
.github/instructions/git-requirements-for-builds.md |
New documentation for git fetch depth and tag synchronization requirements |
.github/instructions/build-configuration-guide.md |
New documentation for choosing appropriate build configurations |
adityapatwardhan
approved these changes
Feb 20, 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.
Backport of #26243 to release/v7.4
Triggered by @TravisEz13 on behalf of @app/copilot-swe-agent
Original CL Label: CL-BuildPackaging
/cc @PowerShell/powershell-maintainers
Impact
REQUIRED: Choose either Tooling Impact or Customer Impact (or both). At least one checkbox must be selected.
Tooling Impact
Refactors xUnit test execution into a reusable GitHub Actions workflow, removes legacy composite action and verification steps. This improves test retryability (tests can be independently retried) and visibility (clearer test results and logs). Required to maintain CI/CD infrastructure consistency across release branches.
Customer Impact
Regression
REQUIRED: Check exactly one box.
This is not a regression.
Testing
Original PR extensively validated with all acceptance criteria met. New reusable workflow tested across Linux, Windows, and macOS. Already successfully backported and merged to v7.5 (PR #26794) and v7.6 (PR #26488). Backport tested by resolving conflicts and verifying workflow structure.
Risk
REQUIRED: Check exactly one box.
High risk as it modifies CI/CD workflows across all platforms (Linux, Windows, macOS). However, this change is necessary to improve flaky test handling and test result visibility. The changes have been validated in master branch and successfully backported to v7.5 and v7.6. Not taking this change creates technical debt and makes future CI updates difficult to backport.
Merge Conflicts
Conflicts occurred in .github/workflows/linux-ci.yml, .github/workflows/macos-ci.yml, and .github/workflows/windows-ci.yml. All conflicts were in the xunit_tests job definition. Resolution: Applied the new reusable workflow pattern from main while preserving release branch conditional logic and other jobs. The refactoring changes the xunit_tests job from step-based execution using a composite action to calling the new reusable workflow.