浏览代码

Add WindowsDesktop integration tests

Oren Novotny 6 年之前
父节点
当前提交
f3ce0f0a1e
共有 2 个文件被更改,包括 98 次插入1 次删除
  1. 34 0
      Rx.NET/Integration/WindowsDesktopTests/WindowsDesktopTests.csproj
  2. 64 1
      azure-pipelines.rx.yml

+ 34 - 0
Rx.NET/Integration/WindowsDesktopTests/WindowsDesktopTests.csproj

@@ -0,0 +1,34 @@
+<Project Sdk="Microsoft.NET.Sdk.WindowsDesktop">
+  <PropertyGroup>
+    <TargetFramework>netcoreapp3.0</TargetFramework>
+    <NoWarn>$(NoWarn);CS0618</NoWarn>
+    <LangVersion>latest</LangVersion>
+    <AssemblyName>Tests.System.Reactive</AssemblyName>
+    <RootNamespace>Tests.System.Reactive</RootNamespace>
+    <SignAssembly>true</SignAssembly>
+    <AssemblyOriginatorKeyFile>..\..\Source\ReactiveX.snk</AssemblyOriginatorKeyFile>
+    <UseWPF>true</UseWPF>
+    <UseWindowsForms>true</UseWindowsForms>
+  </PropertyGroup>
+  
+
+  <PropertyGroup Condition="'$(TargetFramework)' == 'netcoreapp3.0'">
+    <DefineConstants>$(DefineConstants);HAS_TRACE;HAS_WINRT;PREFER_ASYNC;HAS_TPL46;NO_REMOTING;HAS_WINFORMS;HAS_DISPATCHER;DESKTOPCLR</DefineConstants>
+  </PropertyGroup>
+
+  <ItemGroup>
+    <Content Include="..\..\Source\tests\Tests.System.Reactive\xunit.runner.json">
+      <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
+    </Content>
+    <Compile Include="..\..\Source\tests\Tests.System.Reactive\**\*.cs" Exclude="..\..\Source\tests\Tests.System.Reactive\obj\**" />
+  </ItemGroup>
+
+  <ItemGroup>
+    <PackageReference Include="Microsoft.NET.Test.Sdk" Version="16.0.0-preview-20190203-03" />    
+    <PackageReference Include="xunit" Version="2.4.1" />
+    <PackageReference Include="xunit.runner.visualstudio" Version="2.4.1" />
+    <PackageReference Include="System.Reactive" Version="4.2.0-preview.63" />
+    <PackageReference Include="Microsoft.Reactive.Testing" Version="4.2.0-preview.63" />
+    <PackageReference Include="System.Reactive.Observable.Aliases" Version="4.2.0-preview.63" />
+  </ItemGroup>
+</Project>

+ 64 - 1
azure-pipelines.rx.yml

@@ -102,7 +102,7 @@ jobs:
       publishLocation: Container
     condition: always()
 
-- job: Linux_Test
+- job: Integration_Linux_Tests
   dependsOn: Build
   pool:
     vmImage: ubuntu-16.04
@@ -179,3 +179,66 @@ jobs:
       projects: $(System.DefaultWorkingDirectory)/Rx.NET/Integration/LinuxTests/LinuxTests.csproj
       arguments: -c $(BuildConfiguration) -f netcoreapp2.1 /p:TargetFrameworks=netcoreapp2.1
     displayName: Run 2.1 Tests on Linux
+
+- job: Integration_WindowsDesktop_Tests
+  dependsOn: Build
+  pool:
+    vmImage: windows-2019
+  
+  variables: 
+    BuildConfiguration: Release
+    BuildPlatform: Any CPU
+  
+  steps:  
+  - task: DotNetCoreInstaller@0
+    inputs:
+      version: '3.0.100-preview4-010374'
+
+  - task: DotNetCoreCLI@2  
+    inputs:
+      command: custom
+      custom: tool
+      arguments: install --tool-path . nbgv
+    displayName: Install NBGV tool
+
+  - script: ./nbgv cloud -a -p Rx.NET/Source
+    displayName: Set Version
+
+  - task: DownloadBuildArtifacts@0
+    displayName: 'Download Build Artifacts'
+    inputs:
+      artifactName: artifacts
+      downloadPath: $(System.DefaultWorkingDirectory)/Rx.NET/Integration/LocalPackages
+      
+  - powershell: mv $(System.DefaultWorkingDirectory)/Rx.NET/Integration/LocalPackages/artifacts/*.* $(System.DefaultWorkingDirectory)/Rx.NET/Integration/LocalPackages
+
+  - task: DotNetCoreCLI@2
+    displayName: Update Rx
+    inputs:
+      command: custom
+      projects: $(System.DefaultWorkingDirectory)/Rx.NET/Integration/WindowsDesktopTests/WindowsDesktopTests.csproj
+      custom: add
+      arguments: package System.Reactive -v $(NBGV_NuGetPackageVersion) -s $(System.DefaultWorkingDirectory)/Rx.NET/Integration/LocalPackages
+
+  - task: DotNetCoreCLI@2
+    displayName: Update Aliases
+    inputs:
+      command: custom
+      projects: $(System.DefaultWorkingDirectory)/Rx.NET/Integration/WindowsDesktopTests/WindowsDesktopTests.csproj
+      custom: add
+      arguments: package System.Reactive.Observable.Aliases -v $(NBGV_NuGetPackageVersion) -s $(System.DefaultWorkingDirectory)/Rx.NET/Integration/LocalPackages
+
+  - task: DotNetCoreCLI@2
+    displayName: Update Testing
+    inputs:
+      command: custom
+      projects: $(System.DefaultWorkingDirectory)/Rx.NET/Integration/WindowsDesktopTests/WindowsDesktopTests.csproj
+      custom: add
+      arguments: package Microsoft.Reactive.Testing -v $(NBGV_NuGetPackageVersion) -s $(System.DefaultWorkingDirectory)/Rx.NET/Integration/LocalPackages
+
+  - task: DotNetCoreCLI@2
+    inputs:
+      command: test
+      projects: $(System.DefaultWorkingDirectory)/Rx.NET/Integration/WindowsDesktopTests/WindowsDesktopTests.csproj
+      arguments: -c $(BuildConfiguration) 
+    displayName: Run 3.0 Tests on WindowDesktop