Skip to content

ci: split into lint + build matrix with warnings-as-errors#66

Merged
daniel3303 merged 1 commit into
masterfrom
chore/ci-matrix-and-lint
May 14, 2026
Merged

ci: split into lint + build matrix with warnings-as-errors#66
daniel3303 merged 1 commit into
masterfrom
chore/ci-matrix-and-lint

Conversation

@daniel3303
Copy link
Copy Markdown
Owner

Summary

  • Refactors the single CI job into two: a lint job (CSharpier format check + -warnaserror build) and a build matrix across net8/net9/net10.
  • Adds a concurrency group keyed on PR/branch so superseded runs are cancelled (saves Actions minutes and avoids stale status checks).
  • Codecov upload is gated to the net10 matrix entry to avoid duplicate reports.

Code changes

  • .github/workflows/ci.yml — rewritten with lint and build jobs, matrix on framework: [net8.0, net9.0, net10.0], concurrency cancel-in-progress, and Codecov upload only on net10.

Notes

  • Integration tests target net10.0 only, so net8/net9 matrix entries run unit tests only — which is exactly what's needed to catch TFM-specific breakage in the library + unit suite.
  • The lint job uses dotnet csharpier check against the .config/dotnet-tools.json manifest added in chore: add CSharpier and apply one-time format pass #64.
  • Verified locally: dotnet csharpier check . passes, dotnet build -warnaserror produces 0 warnings/errors, full test suite passes on net10.

Replace single-job CI with two:
  * lint — CSharpier format check + -warnaserror build on net10
  * build — matrix across net8.0/net9.0/net10.0, tests + coverage

Add concurrency group so superseded PR runs are cancelled.
Coverage upload is gated to the net10 matrix entry to avoid duplicate
Codecov reports.

Integration tests only target net10.0, so the net8/net9 matrix entries
run unit tests only (which is the point — catch TFM-specific breakage
in the library and unit suite).
@daniel3303 daniel3303 merged commit 205e71c into master May 14, 2026
2 of 4 checks passed
@daniel3303 daniel3303 deleted the chore/ci-matrix-and-lint branch May 14, 2026 11:33
@codecov
Copy link
Copy Markdown

codecov Bot commented May 14, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 99.56%. Comparing base (d7ef7fd) to head (9eecfa9).
⚠️ Report is 3 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master      #66      +/-   ##
==========================================
- Coverage   99.66%   99.56%   -0.10%     
==========================================
  Files          25       25              
  Lines        1177     1157      -20     
  Branches      128      128              
==========================================
- Hits         1173     1152      -21     
  Misses          1        1              
- Partials        3        4       +1     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

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

daniel3303 added a commit that referenced this pull request May 14, 2026
The CI matrix added in #66 silently skipped IntegrationTests on net8/net9
because the project was net10-only. That meant the library's own net8/net9
TFM-conditional code paths (Npgsql.EntityFrameworkCore.PostgreSQL 8.x/9.x)
went untested end-to-end.

Match the unit Tests project pattern:
  - <TargetFrameworks>net8.0;net9.0;net10.0</TargetFrameworks>
  - Conditional package references pinning Npgsql.EFCore to the matching
    8.0.11 / 9.0.4 / 10.0.1 release per TFM (same scheme the library uses).
  - <LangVersion>latest</LangVersion> so the C# 14 compiler is used on
    every TFM — required because several tests use named arguments inside
    LINQ expression trees (a C# 14 feature; net8/net9 default to C# 12/13
    which emit CS0853).

Verified locally: 69 integration tests pass on each TFM.
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.

1 participant