Skip to content

Commit d4c5516

Browse files
github-actions[bot]Copilot
authored andcommitted
test+eng: 37 StructuralInference unit tests; CI reads SDK version from global.json
Task 9 — Testing Improvements: Add tests/FSharp.Data.Core.Tests/StructuralInference.fs with 37 unit tests covering the core type-inference module (StructuralInference.fs, the largest source file at 777 lines) which previously had no dedicated test file. Tests cover: - typeTag (all InferedType cases incl. NET6+ DateOnly/TimeOnly) - subtypeInfered: Top/Null merging, numeric widening hierarchy (Bit0+Bit1→Bit, int+int64→int64, int+float→float, decimal+float→float, Bit0+bool→bool), incompatible types → Heterogeneous, optionality - subtypeInfered with Records: field union, different names → Heterogeneous - inferCollectionType: single type, mixed numeric widening, multiplicity - getInferedTypeFromString: empty→Null, Bit/bool/int/int64/decimal/string/ Guid inference, NoInference mode - InferenceMode'.FromPublicApi: all enum values - supportsUnitsOfMeasure: numeric vs non-numeric types All 2957 tests pass (was 2920 before; +37 new). Task 4 — Engineering Investments: Replace hardcoded dotnet-version: 10.0.201 in pull-requests.yml (×3) and push-master.yml (×1) with dotnet-version-file: global.json. The SDK version is now a single source of truth in global.json (which already has rollForward: latestMinor). Also update step names from 'Setup .NET 10' to 'Setup .NET' so they stay accurate after future SDK bumps. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
1 parent 3884515 commit d4c5516

4 files changed

Lines changed: 363 additions & 8 deletions

File tree

.github/workflows/pull-requests.yml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -13,10 +13,10 @@ jobs:
1313
timeout-minutes: 10
1414
steps:
1515
- uses: actions/checkout@v6
16-
- name: Setup .NET 10
16+
- name: Setup .NET
1717
uses: actions/setup-dotnet@v5
1818
with:
19-
dotnet-version: 10.0.201
19+
dotnet-version-file: global.json
2020
- name: Cache NuGet packages
2121
uses: actions/cache@v5
2222
with:
@@ -37,10 +37,10 @@ jobs:
3737
timeout-minutes: 40
3838
steps:
3939
- uses: actions/checkout@v6
40-
- name: Setup .NET 10
40+
- name: Setup .NET
4141
uses: actions/setup-dotnet@v5
4242
with:
43-
dotnet-version: 10.0.201
43+
dotnet-version-file: global.json
4444
- name: Cache NuGet packages
4545
uses: actions/cache@v5
4646
with:
@@ -63,10 +63,10 @@ jobs:
6363
timeout-minutes: 40
6464
steps:
6565
- uses: actions/checkout@v6
66-
- name: Setup .NET 10
66+
- name: Setup .NET
6767
uses: actions/setup-dotnet@v5
6868
with:
69-
dotnet-version: 10.0.201
69+
dotnet-version-file: global.json
7070
- name: Cache NuGet packages
7171
uses: actions/cache@v5
7272
with:

.github/workflows/push-master.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,10 +17,10 @@ jobs:
1717

1818
steps:
1919
- uses: actions/checkout@v6
20-
- name: Setup .NET 10
20+
- name: Setup .NET
2121
uses: actions/setup-dotnet@v5
2222
with:
23-
dotnet-version: 10.0.201
23+
dotnet-version-file: global.json
2424
- name: Cache NuGet packages
2525
uses: actions/cache@v5
2626
with:

tests/FSharp.Data.Core.Tests/FSharp.Data.Core.Tests.fsproj

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,7 @@
4444
<Compile Include="HtmlAttributeExtensions.fs" />
4545
<Compile Include="HtmlCssSelectors.fs" />
4646
<Compile Include="HtmlTableCell.fs" />
47+
<Compile Include="StructuralInference.fs" />
4748
<Compile Include="StructuralTypes.fs" />
4849
<Compile Include="BaseTypesHtmlDocument.fs" />
4950
<Compile Include="BaseTypesHtmlGenerics.fs" />

0 commit comments

Comments
 (0)