Skip to content

Commit

Permalink
cleanup: upgrade test projects and CI to .NET 5 (#411)
Browse files Browse the repository at this point in the history
  • Loading branch information
natemcmaster authored Nov 30, 2020
1 parent 760247d commit 29ecc17
Show file tree
Hide file tree
Showing 4 changed files with 21 additions and 16 deletions.
17 changes: 11 additions & 6 deletions azure-pipelines.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,15 +22,20 @@ jobs:
MacOS:
vmImage: macOS-latest
Windows:
vmImage: windows-2019
vmImage: windows-latest
pool:
vmImage: $(vmImage)
steps:
- task: UseDotNet@2
displayName: Install .NET Core 3.1 SDK
displayName: Install .NET 5 SDK
inputs:
version: '3.1.x'
version: '5.x'
packageType: sdk
- task: UseDotNet@2
displayName: Install .NET Core 3.1 runtime
inputs:
version: '3.1.x'
packageType: runtime
- task: UseDotNet@2
displayName: Install .NET Core 2.1 runtime
inputs:
Expand All @@ -54,15 +59,15 @@ jobs:
- publish: artifacts/
artifact: Packages
displayName: Publish artifacts
condition: and(succeeded(), eq('windows-2019', variables['vmImage']))
condition: and(succeeded(), eq('windows-latest', variables['vmImage']))
- powershell: ./docs/generate.ps1 -NoBuild
displayName: Generate docs
condition: and(succeeded(), eq('windows-2019', variables['vmImage']))
condition: and(succeeded(), eq('windows-latest', variables['vmImage']))
- powershell: ./docs/push.ps1 -a $(github-api-token-repo-write)
displayName: Publish docs to GitHub Pages
condition: |
and(
succeeded(),
eq('windows-2019', variables['vmImage']),
eq('windows-latest', variables['vmImage']),
not(eq(variables['Build.Reason'], 'PullRequest')),
eq(variables['Build.SourceBranch'], 'refs/heads/master'))
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFrameworks>netcoreapp3.1;netcoreapp2.1</TargetFrameworks>
<TargetFrameworks>net5.0;netcoreapp3.1;netcoreapp2.1</TargetFrameworks>
<TargetFrameworks Condition="'$(TestFullFramework)' != 'false'">$(TargetFrameworks);net472</TargetFrameworks>
</PropertyGroup>

Expand All @@ -15,10 +15,10 @@

<ItemGroup>
<PackageReference Include="coverlet.collector" Version="1.3.0" />
<PackageReference Include="Microsoft.Extensions.DependencyInjection" Version="3.1.9" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="16.7.1" />
<PackageReference Include="Microsoft.Extensions.DependencyInjection" Version="3.1.10" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="16.8.0" />
<PackageReference Include="FluentAssertions" Version="5.10.3" />
<PackageReference Include="Moq" Version="4.14.7" />
<PackageReference Include="Moq" Version="4.15.2" />
<PackageReference Include="xunit" Version="2.4.1" />
<PackageReference Include="xunit.runner.visualstudio" Version="2.4.3" />
</ItemGroup>
Expand Down
2 changes: 1 addition & 1 deletion test/CommandLineUtils.Tests/OptionAttributeTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -241,7 +241,7 @@ public void BindsToStaticProperties()
Assert.Equal(1, PrivateSetterProgram.StaticNumber);
}

#if !NETCOREAPP3_1
#if !NETCOREAPP3_1 && !NET5_0
// .NET Core 3.0 made an intentional breaking change
// see https://github.com/dotnet/coreclr/issues/21268
[Fact]
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFrameworks>netcoreapp3.1;netcoreapp2.1</TargetFrameworks>
<TargetFrameworks>net5.0;netcoreapp3.1;netcoreapp2.1</TargetFrameworks>
<TargetFrameworks Condition="'$(TestFullFramework)' != 'false'">$(TargetFrameworks);net472</TargetFrameworks>
</PropertyGroup>

Expand All @@ -15,9 +15,9 @@

<ItemGroup>
<PackageReference Include="coverlet.collector" Version="1.3.0" />
<PackageReference Include="Microsoft.Extensions.Hosting" Version="3.1.9" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="16.7.1" />
<PackageReference Include="Moq" Version="4.14.7" />
<PackageReference Include="Microsoft.Extensions.Hosting" Version="3.1.10" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="16.8.0" />
<PackageReference Include="Moq" Version="4.15.2" />
<PackageReference Include="xunit" Version="2.4.1" />
<PackageReference Include="xunit.runner.visualstudio" Version="2.4.3" />
</ItemGroup>
Expand Down

0 comments on commit 29ecc17

Please sign in to comment.