Skip to content

Commit 0908329

Browse files
Ci updates (#1202)
* Azure: Try 3.1 sdk * Update azure-pipelines.yml * Target netcoreapp3.1 * Migrate to UseDotNet step * Update azure-pipelines.yml picky, picky * Fix tests
1 parent 7092ae4 commit 0908329

File tree

10 files changed

+20
-18
lines changed

10 files changed

+20
-18
lines changed

azure-pipelines.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
trigger:
22
- main
3+
- ci-updates
34

45
pool:
56
vmImage: 'windows-2019'
@@ -16,7 +17,8 @@ steps:
1617

1718
- script: npm install --global npm
1819

19-
- task: DotNetCoreInstaller@0
20+
- task: UseDotNet@2
21+
displayName: 'Use .NET Core sdk'
2022
inputs:
2123
packageType: 'sdk'
2224
version: '3.1.x'

tests/React.Tests.Benchmarks/React.Tests.Benchmarks.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
<PropertyGroup>
44
<OutputType>Exe</OutputType>
5-
<TargetFrameworks>net461;netcoreapp2.0</TargetFrameworks>
5+
<TargetFrameworks>net461;netcoreapp3.1</TargetFrameworks>
66
</PropertyGroup>
77

88
<ItemGroup>

tests/React.Tests.Common/MemoryFileCacheCore.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
* LICENSE file in the root directory of this source tree.
66
*/
77

8-
#if NETCOREAPP2_0
8+
#if NETCOREAPP
99

1010
using System;
1111
using System.Collections.Generic;

tests/React.Tests.Common/React.Tests.Common.csproj

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
11
<Project Sdk="Microsoft.NET.Sdk">
22

33
<PropertyGroup>
4-
<TargetFrameworks>net461;netcoreapp2.0</TargetFrameworks>
4+
<TargetFrameworks>net461;netcoreapp3.1</TargetFrameworks>
55
<IsPackable>false</IsPackable>
66
</PropertyGroup>
77

88
<ItemGroup>
99
<ProjectReference Include="..\..\src\React.Core\React.Core.csproj" />
1010
</ItemGroup>
1111

12-
<ItemGroup Condition=" '$(TargetFramework)' == 'netcoreapp2.0' ">
12+
<ItemGroup Condition=" '$(TargetFramework)' == 'netcoreapp3.1' ">
1313
<PackageReference Include="Microsoft.Extensions.Caching.Memory" Version="2.2.0" />
1414
</ItemGroup>
1515

tests/React.Tests.Integration/React.Tests.Integration.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<Project Sdk="Microsoft.NET.Sdk">
22
<PropertyGroup>
3-
<TargetFrameworks>net461;netcoreapp2.0</TargetFrameworks>
3+
<TargetFrameworks>net461;netcoreapp3.1</TargetFrameworks>
44
<IsPackable>false</IsPackable>
55
</PropertyGroup>
66
<ItemGroup>

tests/React.Tests/Core/MiddlewareTests.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#if NETCOREAPP2_0
1+
#if NETCOREAPP
22

33
using System.Runtime.InteropServices;
44
using Microsoft.AspNetCore.Hosting;
@@ -13,7 +13,7 @@ public class MiddlewareTests
1313
[Fact]
1414
public void ForwardSlashesAreTransformed()
1515
{
16-
var environment = new Mock<IHostingEnvironment>();
16+
var environment = new Mock<IWebHostEnvironment>();
1717
if (RuntimeInformation.IsOSPlatform(OSPlatform.Windows))
1818
{
1919
environment.Setup(x => x.WebRootPath).Returns("c:\\temp");

tests/React.Tests/Core/ReactEnvironmentTest.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ public void ExecuteWithBabelWithNoNewThread()
4848
environment.ExecuteWithBabel<int>("foo");
4949
mocks.Engine.Verify(x => x.CallFunction<int>("foo"), Times.Exactly(1));
5050
}
51-
#if NET452 || NETCOREAPP2_0
51+
#if NET452 || NETCOREAPP
5252

5353
[Fact]
5454
public void ExecuteWithBabelWithNewThread()

tests/React.Tests/React.Tests.csproj

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
<Copyright>Copyright 2014-Present Facebook, Inc</Copyright>
55
<AssemblyTitle>ReactJS.NET Unit Tests</AssemblyTitle>
66
<Authors>Daniel Lo Nigro</Authors>
7-
<TargetFrameworks>net452;netcoreapp2.0</TargetFrameworks>
7+
<TargetFrameworks>net452;netcoreapp3.1</TargetFrameworks>
88
<AssemblyName>React.Tests</AssemblyName>
99
<AssemblyOriginatorKeyFile>../../src/key.snk</AssemblyOriginatorKeyFile>
1010
<SignAssembly>true</SignAssembly>
@@ -25,11 +25,11 @@
2525
<ProjectReference Include="..\..\src\React.Web.Mvc4\React.Web.Mvc4.csproj" />
2626
</ItemGroup>
2727

28-
<ItemGroup Condition=" '$(TargetFramework)' == 'netcoreapp2.0' ">
28+
<ItemGroup Condition=" '$(TargetFramework)' == 'netcoreapp3.1' ">
2929
<ProjectReference Include="..\..\src\React.Router\React.Router.csproj" />
3030
</ItemGroup>
3131

32-
<ItemGroup Condition=" '$(TargetFramework)' == 'netcoreapp2.0' ">
32+
<ItemGroup Condition=" '$(TargetFramework)' == 'netcoreapp3.1' ">
3333
<PackageReference Include="Microsoft.AspNetCore.Hosting.Abstractions" Version="2.2.0" />
3434
</ItemGroup>
3535

tests/React.Tests/Router/ReactEnvironmentExtensionsTest.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
* This source code is licensed under the MIT license found in the
55
* LICENSE file in the root directory of this source tree.
66
*/
7-
#if NET452 || NETCOREAPP2_0
7+
#if NET452 || NETCOREAPP
88

99
using Moq;
1010
using Xunit;

tests/React.Tests/Router/ReactRouterComponentTest.cs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
* This source code is licensed under the MIT license found in the
55
* LICENSE file in the root directory of this source tree.
66
*/
7-
#if NET452 || NETCOREAPP2_0
7+
#if NET452 || NETCOREAPP
88

99
using Moq;
1010
using Xunit;
@@ -39,15 +39,15 @@ public void RenderJavaScriptShouldNotIncludeContextOrPath(bool clientOnly, bool
3939
@"ReactDOM.render(React.createElement(Foo, {""hello"":""World""}), document.getElementById(""container""))",
4040
result
4141
);
42-
}
43-
else
42+
}
43+
else
4444
{
4545
Assert.Equal(
4646
@"ReactDOM.hydrate(React.createElement(Foo, {""hello"":""World""}), document.getElementById(""container""))",
4747
result
4848
);
4949
}
50-
50+
5151
}
5252

5353
[Theory]
@@ -76,7 +76,7 @@ public void RenderJavaScriptShouldHandleWaitForContentLoad(bool clientOnly, bool
7676
result
7777
);
7878
}
79-
else
79+
else
8080
{
8181
Assert.Equal(
8282
@"window.addEventListener('DOMContentLoaded', function() {ReactDOM.hydrate(React.createElement(Foo, {""hello"":""World""}), document.getElementById(""container""))});",

0 commit comments

Comments
 (0)