Repository navigation
fix(ci): separate dotnet unit and integration event selection - #9415
Conversation
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: 8e12a2a7-61c0-487c-b0f4-9cd99c5a6279
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: 8e12a2a7-61c0-487c-b0f4-9cd99c5a6279
There was a problem hiding this comment.
🟡 Changes recommended
The split skips Azurite-dependent unit tests on branch runs without Azure Storage-specific changes.
1 open finding
What changed in this PR
Separates .NET unit and integration checks so pull requests and merge-queue runs retain unit validation without selecting integration jobs.
Changes:
- Splits jobs while sharing test steps through a YAML anchor.
- Restricts integration checks to configured branch events and updates result dependencies.
- Adds workflow regression tests and automation triggers.
| File | Description |
|---|---|
.github/workflows/github-automation-tests.yml |
Triggers automation tests for .NET workflow changes. |
.github/workflows/dotnet-build-and-test.yml |
Separates test jobs, event gates, coverage, and reporting. |
.github/tests/test_dotnet_build_and_test_workflow.js |
Tests job selection, step conditions, and dependencies. |
🧠 Review effort: Balanced
💡 Add a code-review agent skill for context-aware, tailored reviews. Learn more in the docs.
There was a problem hiding this comment.
MAF Automated Review — Iteration 1
Result: No findings
Scope: full PR (2 commit(s)): 63fd65323535, eb6f5c977e24
Model: gpt-5.6-sol
Overview
The PR separates unprivileged unit checks from integration jobs while keeping their implementation aligned through a shared YAML anchor. Explicit event and branch gates, job-scoped OIDC permissions, integration-environment isolation, aggregate-result dependencies, and focused regression tests constrain the changed behavior. No publishable Critical, High, or Medium defect was established.
Reviewed the supplied pull-request change set across correctness, security/reliability, architecture, and failure behavior.
No publishable findings remained after source verification for this scope.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: 8e12a2a7-61c0-487c-b0f4-9cd99c5a6279
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: 8e12a2a7-61c0-487c-b0f4-9cd99c5a6279
Keep integration checks enabled for reviewer-approved merge groups. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: 8e12a2a7-61c0-487c-b0f4-9cd99c5a6279
Serialize hosted-agent jobs across PRs and branches without replacing pending checks. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: 8e12a2a7-61c0-487c-b0f4-9cd99c5a6279


Motivation & Context
.NET unit checks should remain available for all pull requests and merge-queue runs. Integration checks should also run before merging eligible repository PRs and reviewer-approved merge groups, while direct fork and Dependabot-triggered PR runs remain unit-only.
Description & Review Guide
queue: max(up to 100 pending jobs), avoiding cross-run deployment interference without replacing older pending checks. Other jobs remain parallel.Validation:
node --test .github\tests\*.jspassed (78 existing tests).git diff --checkpassed.actionlint -shellcheck= -ignore 'unknown permission scope "code-quality"' -ignore 'unexpected key "queue" for "concurrency" section' .github\workflows\dotnet-build-and-test.yml .github\workflows\github-automation-tests.ymlpassed. The installed actionlint v1.7.12 reports the same existingcode-qualitypermission diagnostic on both the base revision and this change, and does not yet recognizeconcurrency.queue. The latter was checked against GitHub's documented job-concurrency syntax and the repository's existingqueue: maxusage.Live integration tests were not run locally.
Local selection checks passed for 118 event, source-repository, ref, path-change, and emulator cases.
Additional temporary checks reproduced both Dependabot selectors failing before the correction and passed afterward for 120 event, actor, source-repository, ref, and path combinations, including Dependabot merge groups.
A temporary Foundry scheduling-declaration check failed before the job-level concurrency configuration and passed afterward; actual cross-run scheduling is enforced by GitHub Actions, not simulated locally.
GitHub Actions validation on
9fd1bf55fd1aad789013c8d390b5974703da515epassed: all four builds, both unit-test jobs, both integration-test jobs, the Foundry hosted job, coverage upload, integration report, and required aggregate checks. See the .NET workflow run. CodeQL passed and coverage remained at 86%.Workflow-specific unit tests used during development were removed at the maintainer's request; they are not part of this change.
Related Issue
N/A - maintainer-directed workflow correction; no public issue. No competing open pull request was found in the checked scope.
AI Assistance
AI assistance details: Copilot assisted with workflow analysis, implementation, validation, and this PR description.
Contribution Checklist
breaking changelabel (or add "[BREAKING]" to the title prefix, before or after any language prefix) — a workflow keeps the label and the title prefix in sync automatically.