Skip to content

Commit 3a6e23d

Browse files
authored
Add build-e2e-test to official pipeline (#3170)
* Run build-e2e-tests in official pipeline * Run E2E tests on deps changes
1 parent 22b6d96 commit 3a6e23d

File tree

3 files changed

+25
-3
lines changed

3 files changed

+25
-3
lines changed

.github/workflows/E2ETest.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,15 @@ on:
77
paths:
88
- 'src/**'
99
- 'test/e2e/**'
10+
- 'Directory.Build.targets'
11+
- 'Directory.Packages.props'
1012
pull_request:
1113
branches: [ main, dev ]
1214
paths:
1315
- 'src/**'
1416
- 'test/e2e/**'
17+
- 'Directory.Build.targets'
18+
- 'Directory.Packages.props'
1519

1620
jobs:
1721
e2e-azurestorage-linux:

eng/templates/build.yml

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,20 @@ jobs:
4444
projects: '**/**/*.csproj'
4545
feedsToUse: config
4646
nugetConfigPath: 'nuget.config'
47-
47+
48+
- task: UsePythonVersion@0
49+
inputs:
50+
versionSpec: '3.11.x'
51+
addToPath: true
52+
architecture: 'x64'
53+
54+
- task: PowerShell@2
55+
displayName: 'Build E2E test apps'
56+
inputs:
57+
filePath: 'test/e2e/tests/build-e2e-test.ps1'
58+
arguments: '-SkipStorageEmulator -SkipCoreTools'
59+
pwsh: true
60+
4861
# Build durable-extension
4962
- task: VSBuild@1
5063
displayName: 'Build Durable Extension'

test/e2e/Tests/build-e2e-test.ps1

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ function StopOnFailedExecution {
5959
}
6060

6161
$FUNC_CLI_DIRECTORY = Join-Path $ProjectTemporaryPath 'Azure.Functions.Cli'
62-
if($SkipCoreTool -or (Test-Path $FUNC_CLI_DIRECTORY))
62+
if($SkipCoreTools -or (Test-Path $FUNC_CLI_DIRECTORY))
6363
{
6464
Write-Host "---Skipping Core Tools download---"
6565
}
@@ -144,7 +144,12 @@ function InstallExtensionAndBuildTestApp($testAppDir) {
144144
dotnet add 'extensions.csproj' package 'Microsoft.Azure.WebJobs.Extensions.DurableTask' --version $webJobsExtensionVersion --source ".\packages" --no-restore
145145

146146
Write-Host "Syncing extensions"
147-
.(Join-Path $FUNC_CLI_DIRECTORY "func") extensions sync
147+
if ((Test-Path (Join-Path $FUNC_CLI_DIRECTORY "func")) -or (Test-Path (Join-Path $FUNC_CLI_DIRECTORY "func.exe"))) {
148+
.(Join-Path $FUNC_CLI_DIRECTORY "func") extensions sync
149+
}
150+
else {
151+
Write-Warning "func command not found. Skipping extensions sync."
152+
}
148153
}
149154

150155
if (Test-Path ".\requirements.txt") {

0 commit comments

Comments
 (0)