Skip to content

Commit

Permalink
Set up CI with Azure Pipelines (#482)
Browse files Browse the repository at this point in the history
  • Loading branch information
soninaren authored Nov 6, 2020
1 parent f2884e1 commit b0e54a8
Show file tree
Hide file tree
Showing 95 changed files with 40,794 additions and 5 deletions.
13 changes: 13 additions & 0 deletions FunctionsSdkE2ETests/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
bin
obj
csx
.vs
.DS_Store
.vscode

*.user
*.suo
*.cscfg
*.Cache

pub_razor
31 changes: 31 additions & 0 deletions FunctionsSdkE2ETests/DirectRef.sln
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio Version 16
VisualStudioVersion = 16.0.29905.134
MinimumVisualStudioVersion = 10.0.40219.1
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "DirectRefEMG", "DirectRef\DirectRefEMG\DirectRefEMG.csproj", "{D76D2626-4BD6-495C-A69D-61DBDF330E5C}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "SharedStartup", "SharedStartup\SharedStartup.csproj", "{196A4BB6-8FF2-44C9-BF31-D3517140FD3A}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Release|Any CPU = Release|Any CPU
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{D76D2626-4BD6-495C-A69D-61DBDF330E5C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{D76D2626-4BD6-495C-A69D-61DBDF330E5C}.Debug|Any CPU.Build.0 = Debug|Any CPU
{D76D2626-4BD6-495C-A69D-61DBDF330E5C}.Release|Any CPU.ActiveCfg = Release|Any CPU
{D76D2626-4BD6-495C-A69D-61DBDF330E5C}.Release|Any CPU.Build.0 = Release|Any CPU
{196A4BB6-8FF2-44C9-BF31-D3517140FD3A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{196A4BB6-8FF2-44C9-BF31-D3517140FD3A}.Debug|Any CPU.Build.0 = Debug|Any CPU
{196A4BB6-8FF2-44C9-BF31-D3517140FD3A}.Release|Any CPU.ActiveCfg = Release|Any CPU
{196A4BB6-8FF2-44C9-BF31-D3517140FD3A}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {124DF235-0912-41B0-97D7-55D136A20206}
EndGlobalSection
EndGlobal
24 changes: 24 additions & 0 deletions FunctionsSdkE2ETests/DirectRef/DirectRefEMG/DirectRefEMG.csproj
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
<Project Sdk="Microsoft.NET.Sdk">
<Import Project="..\..\SdkVersion.props" />
<PropertyGroup>
<TargetFramework>netcoreapp2.1</TargetFramework>
<AzureFunctionsVersion>v2</AzureFunctionsVersion>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Microsoft.Azure.Functions.Extensions" Version="1.0.0" />
<PackageReference Include="Microsoft.Azure.WebJobs.Script.ExtensionsMetadataGenerator" Version="$(ExtensionsMetadataGeneratorDirectReferenceVersion)" />
<PackageReference Include="Microsoft.NET.Sdk.Functions" Version="$(MicrosoftNetSdkFunctionsV1PreviousVersion)" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\..\SharedStartup\SharedStartup.csproj" />
</ItemGroup>
<ItemGroup>
<None Update="host.json">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
<None Update="local.settings.json">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
<CopyToPublishDirectory>Never</CopyToPublishDirectory>
</None>
</ItemGroup>
</Project>
14 changes: 14 additions & 0 deletions FunctionsSdkE2ETests/DirectRef/DirectRefEMG/DirectRefStartup.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
using DirectRefEMG;
using Microsoft.Azure.Functions.Extensions.DependencyInjection;

[assembly: FunctionsStartup(typeof(DirectRefStartup))]

namespace DirectRefEMG
{
public class DirectRefStartup : FunctionsStartup
{
public override void Configure(IFunctionsHostBuilder builder)
{
}
}
}
35 changes: 35 additions & 0 deletions FunctionsSdkE2ETests/DirectRef/DirectRefEMG/Function1.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
using System;
using System.IO;
using System.Threading.Tasks;
using Microsoft.AspNetCore.Mvc;
using Microsoft.Azure.WebJobs;
using Microsoft.Azure.WebJobs.Extensions.Http;
using Microsoft.AspNetCore.Http;
using Microsoft.Extensions.Logging;
using Newtonsoft.Json;

namespace DirectRefEMG
{
public static class Function1
{
[FunctionName("Function1")]
public static async Task<IActionResult> Run(
[HttpTrigger(AuthorizationLevel.Function, "get", "post", Route = null)] HttpRequest req,
ILogger log)
{
log.LogInformation("C# HTTP trigger function processed a request.");

string name = req.Query["name"];

string requestBody = await new StreamReader(req.Body).ReadToEndAsync();
dynamic data = JsonConvert.DeserializeObject(requestBody);
name = name ?? data?.name;

string responseMessage = string.IsNullOrEmpty(name)
? "This HTTP triggered function executed successfully. Pass a name in the query string or in the request body for a personalized response."
: $"Hello, {name}. This HTTP triggered function executed successfully.";

return new OkObjectResult(responseMessage);
}
}
}
3 changes: 3 additions & 0 deletions FunctionsSdkE2ETests/DirectRef/DirectRefEMG/host.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"version": "2.0"
}
49 changes: 49 additions & 0 deletions FunctionsSdkE2ETests/FrameworkVersions.sln
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio 15
VisualStudioVersion = 15.0.28307.572
MinimumVisualStudioVersion = 10.0.40219.1
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "SharedStartup", "SharedStartup\SharedStartup.csproj", "{E03C8FCA-EF16-4901-B8C2-97E3ED3722A2}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "NetCore20", "FrameworkVersions\NetCore20\NetCore20.csproj", "{E079DE00-E96B-47DE-AA40-07454B1AFF71}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "NetCore21", "FrameworkVersions\NetCore21\NetCore21.csproj", "{D5EDC07B-5AA4-4426-AEA3-E9B39D263B68}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "NetCore22", "FrameworkVersions\NetCore22\NetCore22.csproj", "{112D1C20-2603-40B3-9EC5-2F15F873DAB4}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "NetStandard20", "FrameworkVersions\NetStandard20\NetStandard20.csproj", "{C9E23629-4E83-4AAA-97D8-7301BC0FB34C}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Release|Any CPU = Release|Any CPU
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{E03C8FCA-EF16-4901-B8C2-97E3ED3722A2}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{E03C8FCA-EF16-4901-B8C2-97E3ED3722A2}.Debug|Any CPU.Build.0 = Debug|Any CPU
{E03C8FCA-EF16-4901-B8C2-97E3ED3722A2}.Release|Any CPU.ActiveCfg = Release|Any CPU
{E03C8FCA-EF16-4901-B8C2-97E3ED3722A2}.Release|Any CPU.Build.0 = Release|Any CPU
{E079DE00-E96B-47DE-AA40-07454B1AFF71}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{E079DE00-E96B-47DE-AA40-07454B1AFF71}.Debug|Any CPU.Build.0 = Debug|Any CPU
{E079DE00-E96B-47DE-AA40-07454B1AFF71}.Release|Any CPU.ActiveCfg = Release|Any CPU
{E079DE00-E96B-47DE-AA40-07454B1AFF71}.Release|Any CPU.Build.0 = Release|Any CPU
{D5EDC07B-5AA4-4426-AEA3-E9B39D263B68}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{D5EDC07B-5AA4-4426-AEA3-E9B39D263B68}.Debug|Any CPU.Build.0 = Debug|Any CPU
{D5EDC07B-5AA4-4426-AEA3-E9B39D263B68}.Release|Any CPU.ActiveCfg = Release|Any CPU
{D5EDC07B-5AA4-4426-AEA3-E9B39D263B68}.Release|Any CPU.Build.0 = Release|Any CPU
{112D1C20-2603-40B3-9EC5-2F15F873DAB4}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{112D1C20-2603-40B3-9EC5-2F15F873DAB4}.Debug|Any CPU.Build.0 = Debug|Any CPU
{112D1C20-2603-40B3-9EC5-2F15F873DAB4}.Release|Any CPU.ActiveCfg = Release|Any CPU
{112D1C20-2603-40B3-9EC5-2F15F873DAB4}.Release|Any CPU.Build.0 = Release|Any CPU
{C9E23629-4E83-4AAA-97D8-7301BC0FB34C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{C9E23629-4E83-4AAA-97D8-7301BC0FB34C}.Debug|Any CPU.Build.0 = Debug|Any CPU
{C9E23629-4E83-4AAA-97D8-7301BC0FB34C}.Release|Any CPU.ActiveCfg = Release|Any CPU
{C9E23629-4E83-4AAA-97D8-7301BC0FB34C}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {BF258C1A-DCD2-4BAA-8455-7B391E0F0AD1}
EndGlobalSection
EndGlobal
22 changes: 22 additions & 0 deletions FunctionsSdkE2ETests/FrameworkVersions/NetCore20/NetCore20.csproj
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
<Project Sdk="Microsoft.NET.Sdk">
<Import Project="..\..\SdkVersion.props"/>
<PropertyGroup>
<TargetFramework>netcoreapp2.0</TargetFramework>
<AzureFunctionsVersion>v2</AzureFunctionsVersion>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Microsoft.NET.Sdk.Functions" Version="$(MicrosoftNetSdkFunctionsV1Version)" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\..\SharedStartup\SharedStartup.csproj" />
</ItemGroup>
<ItemGroup>
<None Update="host.json">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
<None Update="local.settings.json">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
<CopyToPublishDirectory>Never</CopyToPublishDirectory>
</None>
</ItemGroup>
</Project>
3 changes: 3 additions & 0 deletions FunctionsSdkE2ETests/FrameworkVersions/NetCore20/host.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"version": "2.0"
}
22 changes: 22 additions & 0 deletions FunctionsSdkE2ETests/FrameworkVersions/NetCore21/NetCore21.csproj
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
<Project Sdk="Microsoft.NET.Sdk">
<Import Project="..\..\SdkVersion.props"/>
<PropertyGroup>
<TargetFramework>netcoreapp2.1</TargetFramework>
<AzureFunctionsVersion>v2</AzureFunctionsVersion>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Microsoft.NET.Sdk.Functions" Version="$(MicrosoftNetSdkFunctionsV1Version)" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\..\SharedStartup\SharedStartup.csproj" />
</ItemGroup>
<ItemGroup>
<None Update="host.json">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
<None Update="local.settings.json">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
<CopyToPublishDirectory>Never</CopyToPublishDirectory>
</None>
</ItemGroup>
</Project>
3 changes: 3 additions & 0 deletions FunctionsSdkE2ETests/FrameworkVersions/NetCore21/host.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"version": "2.0"
}
22 changes: 22 additions & 0 deletions FunctionsSdkE2ETests/FrameworkVersions/NetCore22/NetCore22.csproj
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
<Project Sdk="Microsoft.NET.Sdk">
<Import Project="..\..\SdkVersion.props"/>
<PropertyGroup>
<TargetFramework>netcoreapp2.2</TargetFramework>
<AzureFunctionsVersion>v2</AzureFunctionsVersion>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Microsoft.NET.Sdk.Functions" Version="$(MicrosoftNetSdkFunctionsV1Version)" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\..\SharedStartup\SharedStartup.csproj" />
</ItemGroup>
<ItemGroup>
<None Update="host.json">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
<None Update="local.settings.json">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
<CopyToPublishDirectory>Never</CopyToPublishDirectory>
</None>
</ItemGroup>
</Project>
3 changes: 3 additions & 0 deletions FunctionsSdkE2ETests/FrameworkVersions/NetCore22/host.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"version": "2.0"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
<Project Sdk="Microsoft.NET.Sdk">
<Import Project="..\..\SdkVersion.props"/>
<PropertyGroup>
<TargetFramework>netstandard2.0</TargetFramework>
<AzureFunctionsVersion>v2</AzureFunctionsVersion>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Microsoft.NET.Sdk.Functions" Version="$(MicrosoftNetSdkFunctionsV1Version)" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\..\SharedStartup\SharedStartup.csproj" />
</ItemGroup>
<ItemGroup>
<None Update="host.json">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
<None Update="local.settings.json">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
<CopyToPublishDirectory>Never</CopyToPublishDirectory>
</None>
</ItemGroup>
</Project>
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"version": "2.0"
}
Loading

0 comments on commit b0e54a8

Please sign in to comment.