Skip to content

ci: add Domain.Tests job to squad-test.yml for xUnit v3 CI validation (#165)#174

Merged
mpaulosky merged 1 commit into
sprint/7-xunit-v3-pilotfrom
squad/165-xunit-v3-ci-validation
Apr 25, 2026
Merged

ci: add Domain.Tests job to squad-test.yml for xUnit v3 CI validation (#165)#174
mpaulosky merged 1 commit into
sprint/7-xunit-v3-pilotfrom
squad/165-xunit-v3-ci-validation

Conversation

@mpaulosky

Copy link
Copy Markdown
Owner

Summary

Adds a test-domain job to squad-test.yml to validate that Domain.Tests runs correctly in CI under xUnit v3. This unblocks Gimli's migration work (#163/#164) — the CI pipeline is ready before test code is written.

Changes

.github/workflows/squad-test.yml — 3 targeted edits:

  1. New test-domain job — runs tests/Domain.Tests with the same pattern as other test jobs:

    • dotnet build + dotnet test --no-build (Release config)
    • --collect:"XPlat Code Coverage" with Cobertura format
    • TRX logger → domain-test-results artifact
    • Guard clause: skips gracefully if project not found
  2. coverage job — added test-domain to needs list so Domain.Tests coverage is included in the report

  3. report job — added test-domain to needs list and job summary output; added domain_status to the overall failure gate

xUnit v3 CI Compatibility

No runner/tool changes were required:

Tool v2 compat v3 compat Notes
dotnet test No changes needed
XPlat Code Coverage Coverlet collector works unchanged
TRX logger Standard .NET test output
EnricoMi/publish-unit-test-result-action Reads TRX, not xUnit-specific
coverlet.collector 10.0.0 Already in Directory.Packages.props

Depends on

PR #173 (feat: add xUnit v3 packages to Directory.Packages.props) should merge first so the NuGet packages are available.

Closes #165


Working as Boromir (DevOps engineer) — CI/CD pipeline management

…#165)

Add dedicated test-domain job to validate Domain.Tests runs correctly
under xUnit v3. The job mirrors the Architecture.Tests pattern:
- dotnet build + dotnet test with Release config
- XPlat Code Coverage (Cobertura format)
- TRX logger for test result publishing
- Artifact upload for post-run inspection

xUnit v3 is fully compatible with dotnet test, XPlat Code Coverage,
and the EnricoMi TRX publisher — no runner or tool changes required.

Also wired test-domain into coverage and report job dependency chains
so Domain.Tests results appear in coverage reports and the job summary.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot AI review requested due to automatic review settings April 25, 2026 02:13
@github-actions github-actions Bot added the squad Squad triage inbox — Lead will assign to a member label Apr 25, 2026
@github-actions

Copy link
Copy Markdown
Contributor

🏗️ PR Added to Squad Triage Queue

This PR has been labeled with squad and added to the triage queue.

Next steps:

  • The squad Lead will review and assign to an appropriate team member
  • A squad:member label will be added after triage

If you know which squad member should handle this, you can add the appropriate squad:member label yourself.

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pull request overview

Adds CI coverage for the xUnit v3 pilot by running tests/Domain.Tests in the existing squad-test GitHub Actions workflow and including its results in coverage + reporting gates.

Changes:

  • Added a new test-domain job to build and run tests/Domain.Tests with TRX + XPlat Code Coverage (Cobertura).
  • Updated coverage to depend on test-domain so its coverage is included in report generation.
  • Updated report to include test-domain status in the job summary and overall failure gate.

Comment on lines +218 to +229
- name: Build Domain Tests
run: dotnet build tests/Domain.Tests --configuration Release --no-restore

- name: Run Domain Tests
id: domain-tests
run: |
mkdir -p test-results
if [ ! -d "tests/Domain.Tests" ]; then
echo "::notice::Domain test project not found at tests/Domain.Tests - skipping"
exit 0
fi

Comment on lines 617 to 620
if [[ "$build_status" == "failure" || "$web_status" == "failure" || \
"$arch_status" == "failure" || "$bunit_status" == "failure" || \
"$arch_status" == "failure" || "$domain_status" == "failure" || \
"$bunit_status" == "failure" || \
"$integration_status" == "failure" || "$apphost_status" == "failure" ]]; then
@github-actions

Copy link
Copy Markdown
Contributor

Test Results Summary

251 tests  +42   251 ✅ +42   14s ⏱️ ±0s
  6 suites + 1     0 💤 ± 0 
  6 files   + 1     0 ❌ ± 0 

Results for commit d9f35a3. ± Comparison against base commit e7035b1.

@codecov

codecov Bot commented Apr 25, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 72.53%. Comparing base (e7035b1) to head (d9f35a3).
⚠️ Report is 5 commits behind head on sprint/7-xunit-v3-pilot.

Additional details and impacted files
@@                     Coverage Diff                     @@
##           sprint/7-xunit-v3-pilot     #174      +/-   ##
===========================================================
+ Coverage                    72.12%   72.53%   +0.41%     
===========================================================
  Files                           43       43              
  Lines                          721      721              
  Branches                       112      112              
===========================================================
+ Hits                           520      523       +3     
+ Misses                         150      149       -1     
+ Partials                        51       49       -2     

see 1 file with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@mpaulosky
mpaulosky merged commit 4ab8756 into sprint/7-xunit-v3-pilot Apr 25, 2026
20 of 21 checks passed
@mpaulosky
mpaulosky deleted the squad/165-xunit-v3-ci-validation branch April 25, 2026 02:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

squad Squad triage inbox — Lead will assign to a member

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants