Add code coverage#4
Merged
Merged
Conversation
Code Coverage OverviewLanguages: Swift Swift / code-coverage/llvm-covThe overall coverage in the branch is 97%. Coverage data for the branch is not yet available. Show a code coverage summary of the most covered files.
Updated |
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
Code coverage
Scripts/coverage.sh, which runs the test suite with coverage instrumentation, exports LCOV (coverage.lcov) and Cobertura (coverage.xml) reports to.build/coverage/, and fails if line coverage of the package sources drops below a threshold.coveragejob to CI that enforces a 95% minimum (current: 96.98%, up from 66.57%), uploads the report to GitHub Code Quality for per-PR coverage display, and archives both reports as a build artifact.push(plus manualworkflow_dispatch), eliminating duplicate push + pull_request runs.Tests (104 total, 68 new)
BindingFormatTests— UUID/Date/Data bindings, Julian day and ISO8601 conversionLocationAndAffinityTests—Connection.Location,URIQueryParameter, all fiveTypeAffinityrulesValueAccessTests— everyBindingconversion andBindingConvertibleconformance,Column.Value,Rowreading of all five value typesConnectionStatementTests— connection properties, extended error codes, execute limits, bind/step error pathsFunctionEdgeCaseTests— function/collation removal, all argument and result types, window-functionxInverse/empty-frame paths, schema DEFAULT clauses, registration failures, stale-error column readsOfficialSuitePortTests— representative cases ported from SQLite's official TCL test suite (select1,null,types,expr,insert/delete/update,collate1), via aTCLHarnesswrapper reproducingexecsql/catchsqlsemanticsVerified on Linux via Docker (
swift:6.3.3, matching the CI container) in addition to macOS.Bug fixes found by the new tests
SQLITE_MAX_FUNCTION_ARG), it invokes thexDestroydestructor itself; the library also released the callback box manually, crashing with SIGSEGV. Fixed for scalar, aggregate, and window functions (collations correctly keep the manual release, sincesqlite3_create_collation_v2does not callxDestroyon failure).TypeAffinity("blob")returned NUMERIC instead of BLOB because rule 3 checked the non-uppercased string.data.sqlitecontains 6099 rows insite_amenities, not 5932.Remaining uncovered lines (~3%) are defensive guards (nil
sqlite3_contextin C callbacks, allocation-failure paths, impossible switch defaults) that cannot be triggered without inducing crashes.Test plan
swift:6.3.3)Scripts/coverage.shexits 0 at the 95% threshold and produces both report files