Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion eng/build/Workers.Dotnet.props
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project>

<ItemGroup>
<PackageReference Include="Microsoft.Azure.Functions.DotNetIsolatedNativeHost" Version="1.0.12" />
<PackageReference Include="Microsoft.Azure.Functions.DotNetIsolatedNativeHost" Version="1.0.13" />
</ItemGroup>

<Target Name="CleanDotnetWorkerFiles" BeforeTargets="AssignTargetPaths" Condition="'$(RuntimeIdentifier)' != ''">
Expand Down
4 changes: 4 additions & 0 deletions eng/ci/integration-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,10 @@ extends:
image: 1es-windows-2022
os: windows

sdl:
suppression:
suppressionFile: $(Build.SourcesDirectory)/eng/sdl/.gdnsuppress

stages:
- stage: Test
jobs:
Expand Down
3 changes: 3 additions & 0 deletions eng/ci/official-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -66,10 +66,13 @@ extends:
name: 1es-pool-azfunc
image: 1es-windows-2022
os: windows

sdl:
codeql:
# Move codeql for source languages to source analysis stage
runSourceLanguagesInSourceAnalysis: true
suppression:
suppressionFile: $(Build.SourcesDirectory)/eng/sdl/.gdnsuppress
spotBugs:
enabled: false # Explicitly disabling as our JavaWorker package causes this to light up and subsequently fail.

Expand Down
29 changes: 24 additions & 5 deletions eng/ci/templates/jobs/run-unit-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,12 @@ jobs:
- job: RunUnitTests
displayName: Run Unit Tests

variables:
- name: test_projects
value: |
**/ExtensionsMetadataGeneratorTests.csproj
**/WebJobs.Script.Tests.csproj

templateContext:
outputParentDirectory: $(Build.ArtifactStagingDirectory)
outputs:
Expand All @@ -15,20 +21,33 @@ jobs:
steps:
- template: /eng/ci/templates/install-dotnet.yml@self

- task: DotNetCoreCLI@2
displayName: Restore
inputs:
command: custom
custom: restore
arguments: -v m
projects: $(test_projects)

- task: DotNetCoreCLI@2
displayName: Build
inputs:
command: build
arguments: -v m -c release --no-restore
projects: $(test_projects)

- task: DotNetCoreCLI@2
displayName: Unit Tests
inputs:
command: test
testRunTitle: Unit Tests
arguments: -v n
projects: |
**\ExtensionsMetadataGeneratorTests.csproj
**\WebJobs.Script.Tests.csproj
arguments: -v m -c release --no-build
projects: $(test_projects)

- task: CopyFiles@2
displayName: Copy deps.json
condition: failed()
inputs:
SourceFolder: out/bin/WebJobs.Script.WebHost/debug
SourceFolder: out/bin/WebJobs.Script.WebHost/release
Contents: '**/Microsoft.Azure.WebJobs.Script.WebHost.deps.json'
TargetFolder: $(Build.ArtifactStagingDirectory)
81 changes: 46 additions & 35 deletions eng/ci/templates/official/jobs/run-integration-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,9 @@ jobs:
os: windows

variables:
IntegrationProject: test/WebJobs.Script.Tests.Integration/WebJobs.Script.Tests.Integration.csproj
IsReleaseBranch: $[contains(variables['Build.SourceBranch'], 'release/')]
test_projects: test/WebJobs.Script.Tests.Integration/WebJobs.Script.Tests.Integration.csproj
is_release: $[contains(variables['Build.SourceBranch'], 'release/')]
test_args: -c release --no-build

steps:
- template: /eng/ci/templates/install-dotnet.yml@self
Expand Down Expand Up @@ -45,12 +46,6 @@ jobs:
command: ci
workingDir: sample/CustomHandlerRetry

- task: DotNetCoreCLI@2
displayName: Build Integration.csproj
inputs:
command: build
projects: $(IntegrationProject)

- task: AzurePowerShell@5
displayName: Checkout secrets
inputs:
Expand All @@ -74,101 +69,117 @@ jobs:
Write-Host "##vso[task.setvariable variable=ConnectionStrings__CosmosDB]$env:CosmosDbSecretMap"
Write-Host "##vso[task.setvariable variable=AzureWebJobsEventHubSender]$env:AzureWebJobsEventHubSenderSecretMap"
Write-Host "##vso[task.setvariable variable=AzureWebJobsEventHubReceiver]$env:AzureWebJobsEventHubReceiverSecretMap"
Write-Host "##vso[task.setvariable variable=AzureWebJobsEventHubPath]testhub"
env:
AzureWebJobsStorageSecretMap: $(Storage)
AzureWebJobsSecondaryStorageSecretMap: $(SecondaryStorage)
CosmosDbSecretMap: $(CosmosDb)
AzureWebJobsEventHubSenderSecretMap: $(EventHub)
AzureWebJobsEventHubReceiverSecretMap: $(EventHub)

- task: DotNetCoreCLI@2
displayName: Restore
inputs:
command: custom
custom: restore
arguments: -v m
projects: $(test_projects)

- task: DotNetCoreCLI@2
displayName: Build
inputs:
command: build
arguments: -v m -c release --no-restore
projects: $(test_projects)

- task: DotNetCoreCLI@2
displayName: C# end to end tests
inputs:
command: test
testRunTitle: C# end to end tests
arguments: '--filter "Group=CSharpEndToEndTests" --no-build'
projects: $(IntegrationProject)
arguments: '--filter "Group=CSharpEndToEndTests" $(test_args)'
projects: $(test_projects)

- task: DotNetCoreCLI@2
displayName: Node end to end tests
condition: succeededOrFailed()
inputs:
command: test
testRunTitle: Node end to end tests
arguments: '--filter "Group=NodeEndToEndTests" --no-build'
projects: $(IntegrationProject)
arguments: '--filter "Group=NodeEndToEndTests" $(test_args)'
projects: $(test_projects)

- task: DotNetCoreCLI@2
displayName: Direct load end to end tests
condition: succeededOrFailed()
inputs:
command: test
testRunTitle: Direct load end to end tests
arguments: '--filter "Group=DirectLoadEndToEndTests" --no-build'
projects: $(IntegrationProject)
arguments: '--filter "Group=DirectLoadEndToEndTests" $(test_args)'
projects: $(test_projects)

- task: DotNetCoreCLI@2
displayName: F# end to end tests
condition: succeededOrFailed()
inputs:
command: test
testRunTitle: F# end to end tests
arguments: '--filter "Group=FSharpEndToEndTests" --no-build'
projects: $(IntegrationProject)
arguments: '--filter "Group=FSharpEndToEndTests" $(test_args)'
projects: $(test_projects)

- task: DotNetCoreCLI@2
displayName: Language worker end to end tests
condition: succeededOrFailed()
inputs:
command: test
testRunTitle: Language worker end to end tests
arguments: '--filter "Group=LanguageWorkerSelectionEndToEndTests" --no-build'
projects: $(IntegrationProject)
arguments: '--filter "Group=LanguageWorkerSelectionEndToEndTests" $(test_args)'
projects: $(test_projects)

- task: DotNetCoreCLI@2
displayName: Node script host end to end tests
condition: succeededOrFailed()
inputs:
command: test
testRunTitle: Node script host end to end tests
arguments: '--filter "Group=NodeScriptHostTests" --no-build'
projects: $(IntegrationProject)
arguments: '--filter "Group=NodeScriptHostTests" $(test_args)'
projects: $(test_projects)

- task: DotNetCoreCLI@2
displayName: Raw assembly end to end tests
condition: succeededOrFailed()
inputs:
command: test
testRunTitle: Raw assembly end to end tests
arguments: '--filter "Group=RawAssemblyEndToEndTests" --no-build'
projects: $(IntegrationProject)
arguments: '--filter "Group=RawAssemblyEndToEndTests" $(test_args)'
projects: $(test_projects)

- task: DotNetCoreCLI@2
displayName: Samples end to end tests
condition: succeededOrFailed()
inputs:
command: test
testRunTitle: Samples end to end tests
arguments: '--filter "Group=SamplesEndToEndTests" --no-build'
projects: $(IntegrationProject)
arguments: '--filter "Group=SamplesEndToEndTests" $(test_args)'
projects: $(test_projects)

- task: DotNetCoreCLI@2
displayName: Drain mode end to end tests
condition: succeededOrFailed()
inputs:
command: test
testRunTitle: Drain mode end to end tests
arguments: '--filter "Group=DrainModeEndToEndTests" --no-build'
projects: $(IntegrationProject)
arguments: '--filter "Group=DrainModeEndToEndTests" $(test_args)'
projects: $(test_projects)

- task: DotNetCoreCLI@2
displayName: Standby mode end to end tests Windows
condition: succeededOrFailed()
inputs:
command: test
testRunTitle: Standby mode end to end tests Windows
arguments: '--filter "Group=StandbyModeEndToEndTests_Windows" --no-build'
projects: $(IntegrationProject)
arguments: '--filter "Group=StandbyModeEndToEndTests_Windows" $(test_args)'
projects: $(test_projects)

# Disabled to unblock in 202401. Will fix shortly.
# - task: DotNetCoreCLI@2
Expand All @@ -177,26 +188,26 @@ jobs:
# inputs:
# command: test
# testRunTitle: Standby mode end to end tests Linux
# arguments: '--filter "Group=StandbyModeEndToEndTests_Linux" --no-build'
# projects: $(IntegrationProject)
# arguments: '--filter "Group=StandbyModeEndToEndTests_Linux" $(test_args)'
# projects: $(test_projects)

- task: DotNetCoreCLI@2
displayName: Linux container end to end tests Windows
condition: succeededOrFailed()
inputs:
command: test
testRunTitle: Linux container end to end tests Windows
arguments: '--filter "Group=ContainerInstanceTests" --no-build'
projects: $(IntegrationProject)
arguments: '--filter "Group=ContainerInstanceTests" $(test_args)'
projects: $(test_projects)

- task: DotNetCoreCLI@2
displayName: Release verification tests
condition: ${{ eq(variables.IsReleaseBranch, true) }}
condition: ${{ eq(variables.is_release, true) }}
inputs:
command: test
testRunTitle: Release verification tests
arguments: '--filter "Group=ReleaseTests" --no-build'
projects: $(IntegrationProject)
arguments: '--filter "Group=ReleaseTests" $(test_args)'
projects: $(test_projects)

- task: AzurePowerShell@5
condition: always()
Expand Down
30 changes: 20 additions & 10 deletions eng/ci/templates/official/jobs/run-non-e2e-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,11 @@ jobs:

pool:
name: 1es-pool-azfunc
image: 1es-windows-2022
image: 1es-windows-2022
os: windows

variables:
IntegrationProject: test/WebJobs.Script.Tests.Integration/WebJobs.Script.Tests.Integration.csproj
test_projects: test/WebJobs.Script.Tests.Integration/WebJobs.Script.Tests.Integration.csproj

steps:
- template: /eng/ci/templates/install-dotnet.yml@self
Expand All @@ -33,12 +33,6 @@ jobs:
targetType: inline
script: 'Install-Module -Name Az.Storage -RequiredVersion 1.11.0 -Scope CurrentUser -Force -AllowClobber'

- task: DotNetCoreCLI@2
displayName: Build Integration.csproj
inputs:
command: build
projects: $(IntegrationProject)

- task: AzurePowerShell@5
displayName: Checkout secrets
inputs:
Expand Down Expand Up @@ -72,13 +66,28 @@ jobs:
az login --service-principal -u $(ARM_CLIENT_ID) --tenant $(ARM_TENANT_ID) --allow-no-subscriptions --federated-token $(ARM_ID_TOKEN)
displayName: 'Login to Azure'

- task: DotNetCoreCLI@2
displayName: Restore
inputs:
command: custom
custom: restore
arguments: -v m
projects: $(test_projects)

- task: DotNetCoreCLI@2
displayName: Build
inputs:
command: build
arguments: -v m -c release --no-restore
projects: $(test_projects)

- task: DotNetCoreCLI@2
displayName: Non-E2E integration tests
inputs:
command: test
testRunTitle: Non-E2E integration tests
arguments: '--filter "Category!=E2E"'
projects: $(IntegrationProject)
arguments: '--filter "Category!=E2E" -c release --no-build'
projects: $(test_projects)
env:
AzureWebJobsStorage: $(Storage)
AzureWebJobsSecondaryStorage: $(SecondaryStorage)
Expand All @@ -89,6 +98,7 @@ jobs:
AzureWebJobsSecretStorageKeyVaultTenantId: $(AzureTenantId)
AzureWebJobsSecretStorageKeyVaultClientId: $(AzureClientId)
AzureWebJobsSecretStorageKeyVaultClientSecret: $(AzureClientSecret)
AzureWebJobsEventHubPath: testhub

- task: AzurePowerShell@5
condition: always()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,12 @@ namespace Microsoft.Azure.WebJobs.Script.Tests.Integration.WebHostEndToEnd
{
public class CSharpPrecompiledEndToEndTestFixture : EndToEndTestFixture
{
private const string TestPathTemplate = "..\\..\\{0}\\debug";
private const string TestPathTemplate = "..\\..\\{0}\\{1}";

private readonly IDisposable _dispose;

public CSharpPrecompiledEndToEndTestFixture(string testProjectName, IDictionary<string, string> envVars = null, string functionWorkerRuntime = "dotnet")
: base(string.Format(TestPathTemplate, testProjectName), testProjectName, functionWorkerRuntime)
: base(string.Format(TestPathTemplate, testProjectName, TestHelpers.BuildConfig), testProjectName, functionWorkerRuntime)
{
if (envVars != null)
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ public HostProcessLauncher(
bool usePublishPath = false)
{
string template = usePublishPath ? PublishPathTemplate : BuildPathTemplate;
_testPath = Path.GetFullPath(string.Format(template, testProjectName, "debug"));
_testPath = Path.GetFullPath(string.Format(template, testProjectName, TestHelpers.BuildConfig));
_envVars = envVars ?? new Dictionary<string, string>();
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,8 +51,8 @@ public class SpecializationE2ETests
private static readonly string _standbyPath = Path.Combine(Path.GetTempPath(), "functions", "standby", "wwwroot");
private static readonly string _scriptRootConfigPath = ConfigurationPath.Combine(ConfigurationSectionNames.WebHost, nameof(ScriptApplicationHostOptions.ScriptPath));

private static readonly string _dotnetIsolated60Path = Path.GetFullPath(@"..\..\DotNetIsolated60\debug");
private static readonly string _dotnetIsolatedUnsuppportedPath = Path.GetFullPath(@"..\..\DotNetIsolatedUnsupportedWorker\debug");
private static readonly string _dotnetIsolated60Path = Path.GetFullPath($@"..\..\DotNetIsolated60\{TestHelpers.BuildConfig}");
private static readonly string _dotnetIsolatedUnsuppportedPath = Path.GetFullPath($@"..\..\DotNetIsolatedUnsupportedWorker\{TestHelpers.BuildConfig}");
private static readonly string _dotnetIsolatedEmptyScriptRoot = Path.GetFullPath(@"..\..\..\..\EmptyScriptRoot");

private static Action<IServiceCollection> _customizeScriptHostServices;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ private class WebHostStartupEndToEndTestFixture : EndToEndTestFixture
private readonly Action _scriptHostBuildInterceptor;

public WebHostStartupEndToEndTestFixture(Action scriptHostBuildInterceptor = null)
: base(@"..\..\DotNetIsolated60\debug", "WebHostStartupEndToEndTests", "dotnet-isolated")
: base(@$"..\..\DotNetIsolated60\{TestHelpers.BuildConfig}", "WebHostStartupEndToEndTests", "dotnet-isolated")
{
_scriptHostBuildInterceptor = scriptHostBuildInterceptor;
}
Expand Down
Loading
Loading