Oren Novotny il y a 6 ans
Parent
commit
cd63badbdd

+ 8 - 0
Rx.NET/Integration/NuGet.Config

@@ -1,6 +1,14 @@
 <?xml version="1.0" encoding="utf-8"?>
 <?xml version="1.0" encoding="utf-8"?>
 <configuration>
 <configuration>
   <packageSources>
   <packageSources>
+    <add key="dotnet-core" value="https://dotnetfeed.blob.core.windows.net/dotnet-core/index.json" />
+    <add key="dotnet-windowsdesktop" value="https://dotnetfeed.blob.core.windows.net/dotnet-windowsdesktop/index.json" />
+    <add key="aspnet-aspnetcore" value="https://dotnetfeed.blob.core.windows.net/aspnet-aspnetcore/index.json" />
+    <add key="aspnet-aspnetcore-tooling" value="https://dotnetfeed.blob.core.windows.net/aspnet-aspnetcore-tooling/index.json" />
+    <add key="aspnet-entityframeworkcore" value="https://dotnetfeed.blob.core.windows.net/aspnet-entityframeworkcore/index.json" />
+    <add key="aspnet-extensions" value="https://dotnetfeed.blob.core.windows.net/aspnet-extensions/index.json" />
+    <add key="gRPC repository" value="https://grpc.jfrog.io/grpc/api/nuget/v3/grpc-nuget-dev" />
+      
     <add key="myget.org rxnet" value="https://dotnet.myget.org/F/rx/api/v3/index.json" />
     <add key="myget.org rxnet" value="https://dotnet.myget.org/F/rx/api/v3/index.json" />
     <add key="Build Packages" value="https://www.myget.org/F/c037199d-41df-4567-b966-25ff65324688/api/v3/index.json" />
     <add key="Build Packages" value="https://www.myget.org/F/c037199d-41df-4567-b966-25ff65324688/api/v3/index.json" />
     <add key="NuGet.org" value="https://api.nuget.org/v3/index.json" />
     <add key="NuGet.org" value="https://api.nuget.org/v3/index.json" />

+ 8 - 0
Rx.NET/Source/CodeCoverage.runsettings

@@ -3,6 +3,14 @@
 <RunSettings>
 <RunSettings>
   <DataCollectionRunSettings>
   <DataCollectionRunSettings>
     <DataCollectors>
     <DataCollectors>
+       <DataCollector friendlyName="XPlat code coverage">
+        <Configuration>
+          <Format>cobertura</Format>
+          <Exclude>[xunit.*]*,[*Tests]*,[*]Xunit.*</Exclude> <!-- [Assembly-Filter]Type-Filter -->
+          <ExcludeByAttribute>Obsolete,GeneratedCodeAttribute,CompilerGeneratedAttribute</ExcludeByAttribute>
+          <SingleHit>false</SingleHit>
+        </Configuration>
+      </DataCollector>    
       <DataCollector friendlyName="Code Coverage" uri="datacollector://Microsoft/CodeCoverage/2.0" assemblyQualifiedName="Microsoft.VisualStudio.Coverage.DynamicCoverageDataCollector, Microsoft.VisualStudio.TraceCollector, Version=11.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
       <DataCollector friendlyName="Code Coverage" uri="datacollector://Microsoft/CodeCoverage/2.0" assemblyQualifiedName="Microsoft.VisualStudio.Coverage.DynamicCoverageDataCollector, Microsoft.VisualStudio.TraceCollector, Version=11.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
         <Configuration>
         <Configuration>
           <CodeCoverage>
           <CodeCoverage>

+ 10 - 0
Rx.NET/Source/Directory.build.props

@@ -21,5 +21,15 @@
     <PublishRepositoryUrl>true</PublishRepositoryUrl>
     <PublishRepositoryUrl>true</PublishRepositoryUrl>
     <LangVersion>latest</LangVersion>
     <LangVersion>latest</LangVersion>
   </PropertyGroup>
   </PropertyGroup>
+  
+  
+  <ItemGroup>
+    <PackageReference Include="Microsoft.SourceLink.GitHub" Version="1.0.0-beta2-19324-01" PrivateAssets="All"/>
+    <PackageReference Include="Nerdbank.GitVersioning" Version="2.3.183" PrivateAssets="all" />
+  </ItemGroup>
+
+  <ItemGroup Condition="'$(IsTestProject)' == 'true'">
+    <PackageReference Include="coverlet.collector" Version="1.0.0" />
+  </ItemGroup>  
 
 
 </Project>
 </Project>

+ 0 - 10
Rx.NET/Source/Directory.build.targets

@@ -24,21 +24,11 @@
     <DefineConstants>$(DefineConstants);HAS_TRACE;HAS_WINRT;PREFER_ASYNC;HAS_TPL46;NO_REMOTING;HAS_WINFORMS;HAS_DISPATCHER;DESKTOPCLR</DefineConstants>
     <DefineConstants>$(DefineConstants);HAS_TRACE;HAS_WINRT;PREFER_ASYNC;HAS_TPL46;NO_REMOTING;HAS_WINFORMS;HAS_DISPATCHER;DESKTOPCLR</DefineConstants>
   </PropertyGroup>
   </PropertyGroup>
 
 
-  <ItemGroup>
-    <!-- Workaround https://github.com/dotnet/sdk/issues/2976 -->
-    <PackageReference Update="Microsoft.NETCore.Platforms" PrivateAssets="All" />
-  </ItemGroup>
-
 
 
   <ItemGroup Condition="'$(TargetFramework)' != 'netcoreapp3.0'">
   <ItemGroup Condition="'$(TargetFramework)' != 'netcoreapp3.0'">
     <PackageReference Include="System.Threading.Tasks.Extensions" Version="4.5.2" />
     <PackageReference Include="System.Threading.Tasks.Extensions" Version="4.5.2" />
   </ItemGroup>
   </ItemGroup>
 
 
-  <ItemGroup>
-    <PackageReference Include="Microsoft.SourceLink.GitHub" Version="1.0.0-beta2-18618-05" PrivateAssets="All"/>
-    <PackageReference Include="Nerdbank.GitVersioning" Version="2.3.105" PrivateAssets="all" />
-  </ItemGroup>
-
   <Target Name="AddCommitHashToAssemblyAttributes" BeforeTargets="GetAssemblyAttributes">
   <Target Name="AddCommitHashToAssemblyAttributes" BeforeTargets="GetAssemblyAttributes">
     <ItemGroup>
     <ItemGroup>
       <AssemblyAttribute Include="System.Reflection.AssemblyMetadataAttribute" Condition=" '$(SourceRevisionId)' != '' ">
       <AssemblyAttribute Include="System.Reflection.AssemblyMetadataAttribute" Condition=" '$(SourceRevisionId)' != '' ">

+ 13 - 0
Rx.NET/Source/NuGet.config

@@ -0,0 +1,13 @@
+<?xml version="1.0" encoding="utf-8"?>
+<configuration>
+  <packageSources>
+    <add key="dotnet-core" value="https://dotnetfeed.blob.core.windows.net/dotnet-core/index.json" />
+    <add key="dotnet-windowsdesktop" value="https://dotnetfeed.blob.core.windows.net/dotnet-windowsdesktop/index.json" />
+    <add key="aspnet-aspnetcore" value="https://dotnetfeed.blob.core.windows.net/aspnet-aspnetcore/index.json" />
+    <add key="aspnet-aspnetcore-tooling" value="https://dotnetfeed.blob.core.windows.net/aspnet-aspnetcore-tooling/index.json" />
+    <add key="aspnet-entityframeworkcore" value="https://dotnetfeed.blob.core.windows.net/aspnet-entityframeworkcore/index.json" />
+    <add key="aspnet-extensions" value="https://dotnetfeed.blob.core.windows.net/aspnet-extensions/index.json" />
+    <add key="gRPC repository" value="https://grpc.jfrog.io/grpc/api/nuget/v3/grpc-nuget-dev" />
+    <add key="NuGet.org" value="https://api.nuget.org/v3/index.json" />
+  </packageSources>
+</configuration>

+ 2 - 2
Rx.NET/Source/global.json

@@ -1,8 +1,8 @@
 {
 {
   "sdk": {
   "sdk": {
-    "version": "3.0.100-preview4"
+    "version": "3.0.100-preview"
   },
   },
   "msbuild-sdks": {
   "msbuild-sdks": {
-    "MSBuild.Sdk.Extras": "2.0.24"
+    "MSBuild.Sdk.Extras": "2.0.29"
   }
   }
 }
 }

+ 0 - 5
Rx.NET/Source/version.json

@@ -6,10 +6,5 @@
   ],
   ],
   "nugetPackageVersion":{
   "nugetPackageVersion":{
     "semVer": 2
     "semVer": 2
-  },
-  "cloudBuild": {
-    "buildNumber": {
-      "enabled": false
-    }
   }
   }
 }
 }

+ 31 - 11
azure-pipelines.rx.yml

@@ -33,7 +33,7 @@ jobs:
   steps:
   steps:
   - task: DotNetCoreInstaller@0
   - task: DotNetCoreInstaller@0
     inputs:
     inputs:
-      version: '3.0.100-preview6-012264'
+      version: '3.0.100-preview7-012588'
 
 
   - task: DotNetCoreCLI@2
   - task: DotNetCoreCLI@2
     inputs:
     inputs:
@@ -59,20 +59,18 @@ jobs:
       command: custom
       command: custom
       arguments: pack Rx.NET/Source/facades/System.Reactive.Compatibility.nuspec -Version $(NBGV_NuGetPackageVersion) -MinClientVersion 2.12 -NoPackageAnalysis -outputdirectory $(Build.ArtifactStagingDirectory)\artifacts
       arguments: pack Rx.NET/Source/facades/System.Reactive.Compatibility.nuspec -Version $(NBGV_NuGetPackageVersion) -MinClientVersion 2.12 -NoPackageAnalysis -outputdirectory $(Build.ArtifactStagingDirectory)\artifacts
 
 
-  - task: MSBuild@1
-    displayName: Build for Test (ppdb) workaround
+  - task: DotNetCoreCLI@2
     inputs:
     inputs:
-      solution: Rx.NET/Source/System.Reactive.sln
-      msbuildArguments: /t:build /p:DebugType=portable
-      platform: $(BuildPlatform)
-      configuration: $(BuildConfiguration)
-      maximumCpuCount: true
+      command: custom
+      custom: tool
+      arguments: install --tool-path . dotnet-reportgenerator-globaltool
+    displayName: Install ReportGenerator tool
 
 
   - task: DotNetCoreCLI@2
   - task: DotNetCoreCLI@2
     inputs:
     inputs:
       command: test
       command: test
       projects: Rx.NET/Source/tests/Tests.System.Reactive/*.csproj
       projects: Rx.NET/Source/tests/Tests.System.Reactive/*.csproj
-      arguments: -c $(BuildConfiguration) --no-build --no-restore --filter "SkipCI!=true" --collect:"Code Coverage" -s $(System.DefaultWorkingDirectory)/Rx.NET/Source/CodeCoverage.runsettings
+      arguments: -c $(BuildConfiguration) --no-build --no-restore --filter "SkipCI!=true" --settings Rx.NET/Source/CodeCoverage.runsettings --collect:"XPlat Code Coverage" -- RunConfiguration.DisableAppDomain=true
     displayName: Run Unit Tests
     displayName: Run Unit Tests
 
 
   - task: DotNetCoreCLI@2
   - task: DotNetCoreCLI@2
@@ -82,7 +80,29 @@ jobs:
       arguments: -c $(BuildConfiguration) --no-build --no-restore
       arguments: -c $(BuildConfiguration) --no-build --no-restore
     displayName: Run Api Approvals Tests
     displayName: Run Api Approvals Tests
 
 
+  - script: reportgenerator -reports:$(Agent.TempDirectory)/**/coverage.cobertura.xml -targetdir:$(Build.SourcesDirectory)/Rx.NET/Source/coverlet/reports -reporttypes:"Cobertura"
+    displayName: Create reports
 
 
+  - task: PublishCodeCoverageResults@1
+    displayName: 'Publish code coverage'
+    inputs:
+      codeCoverageTool: Cobertura
+      summaryFileLocation: $(Build.SourcesDirectory)/Rx.NET/Source/coverlet/reports/Cobertura.xml
+
+  - task: DotNetCoreCLI@2
+    inputs:
+      command: custom
+      custom: tool
+      arguments: install --tool-path . Codecov.Tool
+    displayName: Install Codecov tool
+    condition: and(succeeded(), not(eq(variables['CODECOV_TOKEN'], '')))
+
+  - script: codecov -f $(Build.SourcesDirectory)/Rx.NET/Source/coverlet/reports/Cobertura.xml --flag rxnet
+    env:
+      CODECOV_TOKEN: $(CODECOV_TOKEN)
+    displayName: Upload coverage to Codecov
+    condition: and(succeeded(), not(eq(variables['CODECOV_TOKEN'], '')))
+    
   - task: PowerShell@2
   - task: PowerShell@2
     displayName: Authenticode Sign Packages
     displayName: Authenticode Sign Packages
     inputs:
     inputs:
@@ -113,7 +133,7 @@ jobs:
   steps:
   steps:
   - task: DotNetCoreInstaller@0
   - task: DotNetCoreInstaller@0
     inputs:
     inputs:
-      version: '3.0.100-preview6-012264'
+      version: '3.0.100-preview7-012588'
 
 
   - task: DotNetCoreCLI@2
   - task: DotNetCoreCLI@2
     inputs:
     inputs:
@@ -189,7 +209,7 @@ jobs:
   steps:
   steps:
   - task: DotNetCoreInstaller@0
   - task: DotNetCoreInstaller@0
     inputs:
     inputs:
-      version: '3.0.100-preview6-012264'
+      version: '3.0.100-preview7-012588'
 
 
   - task: DotNetCoreCLI@2
   - task: DotNetCoreCLI@2
     inputs:
     inputs: