Skip to content

Split Windows Pester CI jobs to reduce CI time - #1773

Merged
Steve Lee (SteveL-MSFT) merged 4 commits into
mainfrom
split-ci-pester-tests
Oct 26, 2026
Merged

Steve Lee (SteveL-MSFT) merged 4 commits into
mainfrom
split-ci-pester-tests

Conversation

@SteveL-MSFT

Copy link
Copy Markdown
Member

The Windows dsc and resources Pester groups took ~53 and ~81 minutes; dism_dsc alone accounted for ~73% of the resources time and dsc_functions/expressions for the largest share of dsc.

  • Move dsc/tests into expressions/ (expressions, functions, function list, user functions) and other/, fixing relative $PSScriptRoot paths
  • Group dism_dsc tests into WindowsFeature, OptionalFeature, FeatureOnDemand subfolders
  • Windows pester matrix now runs 8 concurrent jobs; resources excludes dism_dsc
  • build.ps1: -PesterTestGroup accepts paths; new -PesterExcludePath

Linux/macOS matrices are unchanged.

Move dsc tests into expressions/ and other/, group dism_dsc tests by
resource, and expand the Windows pester matrix to run them in parallel.

Co-authored-by: Copilot App <[email protected]>
Copilot AI balanced review requested due to automatic review settings October 24, 2026 01:38

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🔵 Needs a closer look

A missed fixture-path adjustment causes the relocated variables example test to fail on every platform.

No open issues 🎉

What changed in this PR

This PR reorganizes DSC’s Pester suites to reduce Windows CI time through smaller parallel jobs, without changing the Linux/macOS matrices.

Changes:

  • Split Windows Pester execution into eight jobs, separating DSC expressions and three DISM feature suites.
  • Relocate tests into selectable subfolders and adjust relative fixture paths.
  • Allow path-based Pester groups and pass exclusion patterns through the build helpers.
File Description
resources/​dism_dsc/​tests/​WindowsFeature/​windowsFeature_whatif.tests.ps1 Move what-if tests into WindowsFeature group.
resources/​dism_dsc/​tests/​WindowsFeature/​windowsFeature_set.tests.ps1 Move set tests into WindowsFeature group.
resources/​dism_dsc/​tests/​WindowsFeature/​windowsFeature_get.tests.ps1 Move get tests into WindowsFeature group.
resources/​dism_dsc/​tests/​WindowsFeature/​windowsFeature_export.tests.ps1 Move export tests into WindowsFeature group.
resources/​dism_dsc/​tests/​OptionalFeature/​optionalFeature_set.tests.ps1 Move set tests into OptionalFeature group.
resources/​dism_dsc/​tests/​OptionalFeature/​optionalFeature_get.tests.ps1 Move get tests into OptionalFeature group.
resources/​dism_dsc/​tests/​OptionalFeature/​optionalFeature_export.tests.ps1 Move export tests into OptionalFeature group.
resources/​dism_dsc/​tests/​FeatureOnDemand/​featureOnDemand_set.tests.ps1 Move set tests into FeatureOnDemand group.
resources/​dism_dsc/​tests/​FeatureOnDemand/​featureOnDemand_get.tests.ps1 Move get tests into FeatureOnDemand group.
resources/​dism_dsc/​tests/​FeatureOnDemand/​featureOnDemand_export.tests.ps1 Move export tests into FeatureOnDemand group.
helpers.build.psm1 Accept group paths and forward Pester exclusions.
dsc/​tests/​other/​dsc.exit_code.tests.ps1 Move exit-code tests into other group.
dsc/​tests/​other/​dsc.exist.tests.ps1 Move existence tests into other group.
dsc/​tests/​other/​dsc_whatif.tests.ps1 Relocate tests and adjust example path.
dsc/​tests/​other/​dsc_version.tests.ps1 Move version tests into other group.
dsc/​tests/​other/​dsc_variables.tests.ps1 Move configuration-variable tests into other group.
dsc/​tests/​other/​dsc_tracing.tests.ps1 Move tracing tests into other group.
dsc/​tests/​other/​dsc_test.tests.ps1 Move resource-test tests into other group.
dsc/​tests/​other/​dsc_test_resource_errors.tests.ps1 Move executable error tests into other group.
dsc/​tests/​other/​dsc_sshdconfig.tests.ps1 Move SSHD configuration tests into other group.
dsc/​tests/​other/​dsc_settings.tests.ps1 Move settings tests into other group.
dsc/​tests/​other/​dsc_settings_policy_security.tests.ps1 Move policy-security tests into other group.
dsc/​tests/​other/​dsc_set.tests.ps1 Move resource-set tests into other group.
dsc/​tests/​other/​dsc_securitycontext.tests.ps1 Relocate tests and adjust example paths.
dsc/​tests/​other/​dsc_schema.tests.ps1 Move schema tests into other group.
dsc/​tests/​other/​dsc_schema_default.tests.ps1 Move schema-default tests into other group.
dsc/​tests/​other/​dsc_restartRequired.tests.ps1 Move restart-required tests into other group.
dsc/​tests/​other/​dsc_resource_test.tests.ps1 Move direct resource-test coverage into other group.
dsc/​tests/​other/​dsc_resource_set.tests.ps1 Move direct resource-set coverage into other group.
dsc/​tests/​other/​dsc_resource_securitycontext.tests.ps1 Move resource security-context tests into other group.
dsc/​tests/​other/​dsc_resource_schema.tests.ps1 Move resource-schema tests into other group.
dsc/​tests/​other/​dsc_resource_manifest.tests.ps1 Move resource-manifest tests into other group.
dsc/​tests/​other/​dsc_resource_list.tests.ps1 Move resource-list tests into other group.
dsc/​tests/​other/​dsc_resource_input.tests.ps1 Move resource-input tests into other group.
dsc/​tests/​other/​dsc_resource_get.tests.ps1 Move resource-get tests into other group.
dsc/​tests/​other/​dsc_resource_export.tests.ps1 Move resource-export tests into other group.
dsc/​tests/​other/​dsc_resource_deprecated.tests.ps1 Move deprecated-resource tests into other group.
dsc/​tests/​other/​dsc_resource_condition.tests.ps1 Move resource-condition tests into other group.
dsc/​tests/​other/​dsc_reference.tests.ps1 Relocate tests and adjust reference example path.
dsc/​tests/​other/​dsc_parameters.tests.ps1 Relocate tests and adjust parameter fixture paths.
dsc/​tests/​other/​dsc_output.tests.ps1 Move output tests into other group.
dsc/​tests/​other/​dsc_osinfo.tests.ps1 Relocate tests and adjust OSInfo example paths.
dsc/​tests/​other/​dsc_metadata.tests.ps1 Move metadata tests into other group.
dsc/​tests/​other/​dsc_lambda.tests.ps1 Move lambda tests into other group.
dsc/​tests/​other/​dsc_include.tests.ps1 Relocate tests and adjust include fixture paths.
dsc/​tests/​other/​dsc_i18n.tests.ps1 Relocate tests and adjust locale lookup path.
dsc/​tests/​other/​dsc_group.tests.ps1 Relocate tests and adjust group example path.
dsc/​tests/​other/​dsc_extension_secret.tests.ps1 Relocate tests and adjust secret-extension path.
dsc/​tests/​other/​dsc_extension_manifest.tests.ps1 Move extension-manifest tests into other group.
dsc/​tests/​other/​dsc_extension_import.tests.ps1 Move import-extension tests into other group.
dsc/​tests/​other/​dsc_extension_discover.tests.ps1 Relocate tests and adjust discovery-extension path.
dsc/​tests/​other/​dsc_export.tests.ps1 Move export tests into other group.
dsc/​tests/​other/​dsc_discovery.tests.ps1 Relocate tests and adjust adapter fixture paths.
dsc/​tests/​other/​dsc_config_version.tests.ps1 Move configuration-version tests into other group.
dsc/​tests/​other/​dsc_config_test.tests.ps1 Move configuration-test coverage into other group.
dsc/​tests/​other/​dsc_config_set.tests.ps1 Move configuration-set coverage into other group.
dsc/​tests/​other/​dsc_config_get.tests.ps1 Relocate tests and adjust configuration fixture paths.
dsc/​tests/​other/​dsc_config_export.tests.ps1 Move configuration-export coverage into other group.
dsc/​tests/​other/​dsc_brew.tests.ps1 Relocate tests and adjust Brew example paths.
dsc/​tests/​other/​dsc_assertion.tests.ps1 Relocate tests and adjust assertion example path.
dsc/​tests/​other/​dsc_args.tests.ps1 Relocate tests and adjust argument fixture paths.
dsc/​tests/​other/​dsc_adapter.tests.ps1 Relocate tests and adjust adapter module path.
dsc/​tests/​other/​dsc_adaptedResource.tests.ps1 Move adapted-resource tests into other group.
dsc/​tests/​expressions/​dsc_user_functions.tests.ps1 Move user-function tests into expressions group.
dsc/​tests/​expressions/​dsc_function_list.tests.ps1 Move function-list tests into expressions group.
dsc/​tests/​expressions/​dsc_expressions.tests.ps1 Relocate expression tests and adjust example path.
build.ps1 Accept Pester group paths and exclusion patterns.
.github/​workflows/​rust.yml Define eight Windows jobs with distinct coverage artifacts.

Review effort: Balanced

@github-actions

github-actions Bot commented Oct 24, 2026 •

Copy link
Copy Markdown

Code Coverage Report

No Rust files were changed in this PR.

🔵 Full Codebase Coverage

83% (good)

Metric Value
Total executable lines 20436
Lines covered by tests 17043
Coverage percentage 83%

Full codebase coverage measures all instrumented Rust lines across the project.

@SteveL-MSFT
Steve Lee (SteveL-MSFT) added this pull request to the merge queue Oct 26, 2026
Merged via the queue into main with commit bd0aa65 Oct 26, 2026
31 checks passed
@SteveL-MSFT
Steve Lee (SteveL-MSFT) deleted the split-ci-pester-tests branch October 26, 2026 17:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants