ci(191): cross-OS build/test matrix, samples build, integration categorization#208
Merged
Conversation
… test categorization
Adds two new CI jobs alongside the existing pr-checks/build/analyze gates (unchanged):
- build-test-matrix: builds and unit-tests on ubuntu/windows/macos with Category!=Integration,
exercising the windows net472 MSBuild-host path and macos path/line-ending behavior that an
ubuntu-only pipeline never reaches.
- samples-build: builds every sample under samples/ with -p:EfcptEnabled=false so no live DB or
efcpt invocation is required, proving the samples compile in CI.
Tags Testcontainers/live-cloud/real-efcpt tests with [Trait("Category", "Integration")] so the
new matrix legs skip them (they stay ubuntu-only via the unchanged pr-checks job). Fixes
pre-existing sample bugs blocking a green samples-build: EF Core 10.0.1/net8.0 TFM mismatches,
a hardcoded C:\tmp nuget source, and central package management leaking into samples/ (new
samples/Directory.Build.props and samples/Directory.Packages.props opt samples out of repo-root
CPM, matching how each sample already pins its own package versions).
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
…ample build
- build-test-matrix comment no longer overclaims net472-host/real-efcpt coverage: those tests
are [Trait("Category","Integration")]-tagged and excluded on every matrix leg by the
Category!=Integration filter; that coverage stays on the ubuntu pr-checks job. The matrix leg
validates cross-OS build + the non-integration unit/logic suite (path-separator/line-ending/
OS-specific behavior).
- samples-build no longer builds samples/custom-provider/Acme.Efcpt.Mongo explicitly - it is a
member of JD.Efcpt.Build.sln and already built by the "Restore and build library" step.
- Added a maintainability note by the pack step: samples resolve the locally-packed 1.0.0
package from ./artifacts via Version="*", which assumes the local build sorts at/above any
published version; revisit on a real >=1.0 release.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #208 +/- ##
==========================================
+ Coverage 84.93% 92.19% +7.26%
==========================================
Files 93 93
Lines 4832 4832
Branches 746 620 -126
==========================================
+ Hits 4104 4455 +351
+ Misses 429 377 -52
+ Partials 299 0 -299
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
The samples-build job failed on the first sample (sdk-zero-config) with NU1301: local source '<repo-root>/packages' doesn't exist. Root cause: samples/sdk-zero-config/nuget.config has no <clear/>, so it inherited samples/NuGet.config's stale `local-packages` source value="../packages" (= <repo-root>/packages, a directory that never exists). Every sample lacking its own <clear/>'d config (sdk-zero-config, connection-string-sqlite) inherited the same bad feed. Fixes: - samples/NuGet.config: repoint local-packages from ../packages to ../artifacts (the repo-root folder the Pack step actually writes to). - samples-build workflow: pass the packed feed explicitly on each restore via --source "$GITHUB_WORKSPACE/artifacts" (+ nuget.org), which overrides per-sample nuget.config package sources for the restore so it no longer depends on relative-path resolution. This also covers split-data-and-models (whose config only lists ../../pkg) resolving JD.Efcpt.Build from the artifacts feed. No source/test changes. All other sample configs already <clear/> and point at valid feeds. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Contributor
Code Coverage |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Implements the CI compatibility-matrix sub-item of #191: the project claims an OS x .NET-version support matrix, but CI only ever built/tested on ubuntu. This adds real cross-OS coverage and a samples build, without touching the existing merge-gating jobs.
build-test-matrix(new):ubuntu-latest/windows-latest/macos-latestx .NET 8/9/10,fail-fast: false, 30 min timeout. BuildsJD.Efcpt.Build.slnRelease and runsdotnet test --filter "Category!=Integration". The windows leg is the only place in CI that exercises the net472 Framework-MSBuild task-loading path; macos catches path-separator/line-ending assumptions.samples-build(new):ubuntu-latest, 20 min timeout. Packs the library to a local NuGet feed (./artifacts,./pkg), then builds every sample undersamples/individually with-p:EfcptEnabled=falseso the generation pipeline is fully inert - no DB connection, DACPAC query, orefcptinvocation ever happens. Proves the samples are well-formed and reference resolvable packages/SDKs.[Trait("Category", "Integration")]added to every test that needs Docker (Testcontainers), a live cloud secret store, or the realefcptCLI, sobuild-test-matrixcan safely exclude them via the filter whilepr-checkskeeps running the full suite unchanged on ubuntu.concurrencygroup added to the workflow (wasn't previously present).Existing required checks (
build,pr-checks,analyze) are UNCHANGED -pr-checks's job id/name and steps are untouched, andbuild/analyzelive in separate workflow files (vsix.yml/vscode-ext.yml/docs.ymlforbuild,codeql-analysis.ymlforanalyze) that this PR does not touch. The two new jobs are purely additive with their own job ids.Pre-existing sample bugs fixed (blocking a green
samples-build).csprojfiles targetednet8.0while pinningMicrosoft.EntityFrameworkCore(.SqlServer) 10.0.1, which only supportsnet10.0- bumped TFM tonet10.0to match the already-pinned package version.samples/database-first-sql-generation/nuget.configpointed at a hardcoded, non-portableC:\tmp\local-packagessource - fixed to the relative../../artifactspath used by every other sample.Directory.Packages.props,ManagePackageVersionsCentrally=true) was leaking intosamples/, which pins its own package versions inline (not CPM-managed) - addedsamples/Directory.Build.propsandsamples/Directory.Packages.propsso samples opt out, matching how they're actually authored.samples/Samples.slnitself is broken (a stalesimple-sql-integrationproject reference to a directory that no longer exists in the repo) -samples-buildbuilds each sample solution/project individually instead of the aggregate.sln.Tests tagged
[Trait("Category", "Integration")]Class-level (Testcontainers - Docker/live DB):
SqlServerSchemaIntegrationTests,MySqlSchemaIntegrationTests,FirebirdSchemaIntegrationTests,PostgreSqlSchemaIntegrationTests,OracleSchemaIntegrationTests,SnowflakeSchemaIntegrationTests,QuerySchemaMetadataIntegrationTests,EndToEndReverseEngineeringTests(all intests/JD.Efcpt.Build.Tests/Integration/)SqlGenerationIntegrationTests,SqlProjectTargetDiagnosticTests,CodeGenerationTests,SdkNet80Tests,SdkNet90Tests,SdkNet100Tests,BuildPackageTests,DesignTimeBuildTests,FrameworkMsBuildTests,TemplateTests(all intests/JD.Efcpt.Sdk.IntegrationTests/- each drives a realdotnet buildagainst a realefcpttool-manifest install)Method-level (mixed fake/real scenarios in the same class):
PipelineTests.End_to_end_generates_dacpac_and_runs_real_efcpt(its sibling fake-mode test stays untagged)DirectDacpacTests.Pipeline_succeeds_with_direct_dacpac_real_efcpt(its 3 sibling fake-mode tests stay untagged)AwsSecretsManagerConnectionStringSourceTests.Real_secrets_manager_endpoint_resolves_secret,AzureKeyVaultConnectionStringSourceTests.Real_key_vault_endpoint_resolves_secret(both already self-skip viaSkip.Ifwhen live credentials aren't set, but tagging keeps them consistent with the filter)Not tagged (verified safe to run everywhere):
SqliteSchemaIntegrationTests(local temp file, no Docker/server),ContainerStartupTests(pure string-matching unit test, no Docker),RunSqlPackageTests(spawns the localdotnethost only),BuildTransitiveTests(static nupkg zip inspection, no build/tool).Local validation (Windows)
dotnet build JD.Efcpt.Build.sln -c Release- 0 errors, 6 pre-existing warnings (unrelatedMicrosoft.Build.*TFM-support warnings).dotnet test JD.Efcpt.Build.sln -c Release --no-build --filter "Category!=Integration"- 1233 passed, 0 failed, 0 skipped across 7 test assemblies. This is effectively the windows leg of the new matrix, run locally - no cross-platform test failures found or anticipated to fix.custom-providerclass library) built individually with-p:EfcptEnabled=false- 0 errors.Test plan
pr-checksstays green (unchanged full suite + coverage, ubuntu)build-test-matrixgreen on ubuntu-latest / windows-latest / macos-latestsamples-buildgreen on ubuntu-latestbuild(vsix/vscode-ext/docs) andanalyze(CodeQL) checks unaffectedPart of #191.