Skip to content

Commit 28414d4

Browse files
authored
Add .NET 10 tests (#575)
* Add .NET 10 tests * Fix yml matrix * Fix workflow * Use variable
1 parent 1724243 commit 28414d4

File tree

4 files changed

+20
-8
lines changed

4 files changed

+20
-8
lines changed

.github/workflows/pr-validation.yml

Lines changed: 15 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,29 +2,38 @@ name: pr-validation
22

33
on: pull_request
44

5+
env:
6+
LATEST_DOTNET_VERSION: 10.x
7+
58
jobs:
69
test:
710
runs-on: ${{ matrix.os }}
811
strategy:
912
fail-fast: false
1013
matrix:
1114
os: [windows-latest, ubuntu-latest, macos-latest]
12-
targetFramework: [net8.0, net9.0]
15+
targetFramework: [net8.0, net9.0, net10.0]
1316
include:
1417
- targetFramework: net8.0
1518
dotnetVersion: 8.x
1619
- targetFramework: net9.0
1720
dotnetVersion: 9.x
21+
- targetFramework: net10.0
22+
dotnetVersion: 10.x
1823
steps:
19-
- uses: actions/checkout@v4
20-
- uses: actions/setup-dotnet@v4 # Latest version is always required
24+
- name: Checkout
25+
uses: actions/checkout@v4
26+
- name: Setup .NET ${{ env.LATEST_DOTNET_VERSION }}
27+
uses: actions/setup-dotnet@v4 # Latest version is always required
2128
with:
22-
dotnet-version: 9.x
29+
dotnet-version: ${{ env.LATEST_DOTNET_VERSION }}
2330
dotnet-quality: preview
24-
- uses: actions/setup-dotnet@v4
31+
- name: Setup .NET ${{ matrix.dotnetVersion }}
32+
if: ${{ matrix.dotnetVersion != env.LATEST_DOTNET_VERSION }}
33+
uses: actions/setup-dotnet@v4
2534
with:
2635
dotnet-version: ${{ matrix.dotnetVersion }}
27-
dotnet-quality: preview
36+
dotnet-quality: ga
2837
- run: dotnet build DacFx.sln
2938
- run: dotnet pack DacFx.sln --no-build
3039
- run: dotnet test DacFx.sln --no-build -f ${{ matrix.targetFramework }}

src/Microsoft.Build.Sql/sdk/Sdk.targets

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@
7373
<Target Name="CheckForDuplicateSqlItems" Condition="'$(NetCoreBuild)' == 'true'" BeforeTargets="_SetupSqlBuildInputs">
7474

7575
<PropertyGroup>
76-
<DefaultItemsMoreInformationLink>https://aka.ms/upgrade-sqlproject</DefaultItemsMoreInformationLink>
76+
<DefaultItemsMoreInformationLink>https://aka.ms/upgrade-sqlproject#required-remove-build-items-included-by-default</DefaultItemsMoreInformationLink>
7777
</PropertyGroup>
7878

7979
<CheckForDuplicateItems

test/Microsoft.Build.Sql.Tests/BuildTests.cs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -324,6 +324,9 @@ public void VerifyBuildWithTransitiveProjectReferences()
324324
[TestCase("net8.0")]
325325
#if NET9_0_OR_GREATER
326326
[TestCase("net9.0")]
327+
#endif
328+
#if NET10_0_OR_GREATER
329+
[TestCase("net10.0")]
327330
#endif
328331
// https://github.com/microsoft/DacFx/issues/330
329332
public void VerifyBuildWithDifferentTargetFrameworks(string targetFramework)

test/Microsoft.Build.Sql.Tests/Microsoft.Build.Sql.Tests.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
<PropertyGroup>
44
<!-- Multi-targeting to test SDK on different .NET versions, requires all of the following SDKs to be installed. -->
55
<!-- To build and test only one version, add -f to dotnet command. -->
6-
<TargetFrameworks>net8.0;net9.0</TargetFrameworks>
6+
<TargetFrameworks>net8.0;net9.0;net10.0</TargetFrameworks>
77
<Nullable>enable</Nullable>
88
<!-- Disable EOL target framework check since we're explicitly testing against older .NET versions. -->
99
<CheckEolTargetFramework>false</CheckEolTargetFramework>

0 commit comments

Comments
 (0)