X Tutup
Skip to content

[release/v7.4] Refactor: Centralize xUnit tests into reusable workflow and remove legacy verification#26864

Merged
adityapatwardhan merged 1 commit intoPowerShell:release/v7.4from
TravisEz13:backport/release/v7.4/26243-90e9159cb
Feb 20, 2026
Merged

[release/v7.4] Refactor: Centralize xUnit tests into reusable workflow and remove legacy verification#26864
adityapatwardhan merged 1 commit intoPowerShell:release/v7.4from
TravisEz13:backport/release/v7.4/26243-90e9159cb

Conversation

@TravisEz13
Copy link
Member

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

  • Required tooling change
  • Optional tooling change (include reasoning)

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

  • Customer reported
  • Found internally

Regression

REQUIRED: Check exactly one box.

  • Yes
  • No

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
  • Medium
  • Low

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.

…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>
@TravisEz13 TravisEz13 requested a review from a team as a code owner February 20, 2026 18:37
Copilot AI review requested due to automatic review settings February 20, 2026 18:37
@TravisEz13 TravisEz13 added the CL-BuildPackaging Indicates that a PR should be marked as a build or packaging change in the Change Log label Feb 20, 2026
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.yml that builds PowerShell and runs xUnit tests independently
  • Removes legacy xUnit test execution from .github/actions/build/ci/action.yml composite action
  • Deletes .github/actions/test/verify_xunit/action.yml verification 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 adityapatwardhan merged commit 400e22e into PowerShell:release/v7.4 Feb 20, 2026
44 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CL-BuildPackaging Indicates that a PR should be marked as a build or packaging change in the Change Log

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants

X Tutup