Skip to content

Commit

Permalink
Updating ASP.NET Core integration CI to include tests
Browse files Browse the repository at this point in the history
  • Loading branch information
fabiocav committed Oct 18, 2023
1 parent 254da2e commit 9ca39bf
Show file tree
Hide file tree
Showing 7 changed files with 24 additions and 17 deletions.
12 changes: 6 additions & 6 deletions DotNetWorker.sln
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "AspNetIntegration", "sample
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "DependentAssemblyWithFunctions", "test\DependentAssemblyWithFunctions\DependentAssemblyWithFunctions.csproj", "{AB6E1E7A-0D2C-4086-9487-566887C1E753}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Worker.Extensions.Http.AspNetCore.Tests", "test\Worker.Extensions.Http.AspNetCore.Tests\Worker.Extensions.Http.AspNetCore.Tests.csproj", "{8970EB64-E6B1-465C-BBBC-CE3D9F257BBF}"
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Worker.Extensions.Http.AspNetCore.Tests", "test\extensions\Worker.Extensions.Http.AspNetCore.Tests\Worker.Extensions.Http.AspNetCore.Tests.csproj", "{D8E79B53-9A44-46CC-9D7A-E9494FC8CAF4}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Expand Down Expand Up @@ -334,10 +334,10 @@ Global
{AB6E1E7A-0D2C-4086-9487-566887C1E753}.Debug|Any CPU.Build.0 = Debug|Any CPU
{AB6E1E7A-0D2C-4086-9487-566887C1E753}.Release|Any CPU.ActiveCfg = Release|Any CPU
{AB6E1E7A-0D2C-4086-9487-566887C1E753}.Release|Any CPU.Build.0 = Release|Any CPU
{8970EB64-E6B1-465C-BBBC-CE3D9F257BBF}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{8970EB64-E6B1-465C-BBBC-CE3D9F257BBF}.Debug|Any CPU.Build.0 = Debug|Any CPU
{8970EB64-E6B1-465C-BBBC-CE3D9F257BBF}.Release|Any CPU.ActiveCfg = Release|Any CPU
{8970EB64-E6B1-465C-BBBC-CE3D9F257BBF}.Release|Any CPU.Build.0 = Release|Any CPU
{D8E79B53-9A44-46CC-9D7A-E9494FC8CAF4}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{D8E79B53-9A44-46CC-9D7A-E9494FC8CAF4}.Debug|Any CPU.Build.0 = Debug|Any CPU
{D8E79B53-9A44-46CC-9D7A-E9494FC8CAF4}.Release|Any CPU.ActiveCfg = Release|Any CPU
{D8E79B53-9A44-46CC-9D7A-E9494FC8CAF4}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
Expand Down Expand Up @@ -396,7 +396,7 @@ Global
{17BDCE12-6964-4B87-B2AC-68CE270A3E9A} = {FD7243E4-BF18-43F8-8744-BA1D17ACF378}
{D2F67410-9933-42E8-B04A-E17634D83A30} = {9D6603BD-7EA2-4D11-A69C-0D9E01317FD6}
{AB6E1E7A-0D2C-4086-9487-566887C1E753} = {B5821230-6E0A-4535-88A9-ED31B6F07596}
{8970EB64-E6B1-465C-BBBC-CE3D9F257BBF} = {AA4D318D-101B-49E7-A4EC-B34165AEDB33}
{D8E79B53-9A44-46CC-9D7A-E9494FC8CAF4} = {AA4D318D-101B-49E7-A4EC-B34165AEDB33}
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {497D2ED4-A13E-4BCA-8D29-F30CA7D0EA4A}
Expand Down
20 changes: 12 additions & 8 deletions build/pipelines/templates/extensions-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@ parameters:
- name: ExtensionDirectory
type: string
default: not-specified
- name: RunExtensionTests
displayName: Run Extension Tests?
type: boolean
default: false

jobs:
- job: "Build_And_Test_Windows"
Expand All @@ -23,14 +27,14 @@ jobs:
arguments: '-c Release -p:BuildNumber=$(buildNumber) -p:IsLocalBuild=False'
projects: ${{ parameters.ExtensionDirectory }}/src/*.csproj

# Extensions test structure must be defined
# - task: DotNetCoreCLI@2
# displayName: 'Run tests'
# inputs:
# command: 'test'
# arguments: '--no-build -c Release'
# projects: |
# test/**/*Tests.csproj
- ${{ if eq(parameters.RunExtensionTests, true) }}:
- task: DotNetCoreCLI@2
displayName: 'Run tests'
inputs:
command: 'test'
arguments: '-c Release'
projects: |
test/${{ parameters.ExtensionDirectory }}.Tests/**/*Tests.csproj
- task: SFP.build-tasks.custom-build-task-1.EsrpCodeSigning@2
displayName: 'ESRP CodeSigning - Authenticode'
Expand Down
3 changes: 3 additions & 0 deletions extensions/Worker.Extensions.Http.AspNetCore/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ trigger:
paths:
include:
- extensions/Worker.Extensions.Http.AspNetCore/
- test/extensions/Worker.Extensions.Http.AspNetCore.Tests/

pr:
branches:
Expand All @@ -17,8 +18,10 @@ pr:
paths:
include:
- extensions/Worker.Extensions.Http.AspNetCore/
- test/extensions/Worker.Extensions.Http.AspNetCore.Tests/

extends:
template: ../../build/pipelines/templates/extensions-ci.yml
parameters:
ExtensionDirectory: extensions/Worker.Extensions.Http.AspNetCore
RunExtensionTests: true
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,4 @@

### Microsoft.Azure.Functions.Worker.Extensions.Http.AspNetCore <version>

- <entry>
- New overload added to `ConfigureFunctionsWebApplication` to take a `HostBuilderContext` (#1925). Thank you @vmcbaptista
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
<IsPackable>false</IsPackable>
<IsTestProject>true</IsTestProject>
<SignAssembly>True</SignAssembly>
<AssemblyOriginatorKeyFile>..\..\key.snk</AssemblyOriginatorKeyFile>
<AssemblyOriginatorKeyFile>..\..\..\key.snk</AssemblyOriginatorKeyFile>
</PropertyGroup>

<ItemGroup>
Expand All @@ -26,7 +26,7 @@
</ItemGroup>

<ItemGroup>
<ProjectReference Include="..\..\extensions\Worker.Extensions.Http.AspNetCore\src\Worker.Extensions.Http.AspNetCore.csproj" />
<ProjectReference Include="..\..\..\extensions\Worker.Extensions.Http.AspNetCore\src\Worker.Extensions.Http.AspNetCore.csproj" />
</ItemGroup>

</Project>

0 comments on commit 9ca39bf

Please sign in to comment.