Skip to content

Commit afc142a

Browse files
authored
Merge branch 'dev' into hallvictoria/async-cache
2 parents 551a21f + e87a31a commit afc142a

File tree

3 files changed

+62
-3
lines changed

3 files changed

+62
-3
lines changed

eng/ci/public-build.yml

+2-1
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,8 @@ extends:
3636
compiled:
3737
enabled: true # still only runs for default branch
3838
runSourceLanguagesInSourceAnalysis: true
39-
39+
settings:
40+
skipBuildTagsForGitHubPullRequests: ${{ variables['System.PullRequest.IsFork'] }}
4041
stages:
4142
- stage: Build
4243
jobs:

eng/templates/official/jobs/ci-e2e-tests.yml

+58-1
Original file line numberDiff line numberDiff line change
@@ -77,8 +77,64 @@ jobs:
7777
python setup.py build
7878
python setup.py webhost --branch-name=dev
7979
python setup.py extension
80-
mkdir logs
8180
displayName: 'Install dependencies and the worker'
81+
condition: and(eq(variables['USETESTPYTHONSDK'], false), eq(variables['USETESTPYTHONEXTENSIONS'], false))
82+
- task: DownloadPipelineArtifact@2
83+
displayName: 'Download Python SDK Artifact'
84+
inputs:
85+
buildType: specific
86+
artifactName: 'azure-functions'
87+
project: 'internal'
88+
definition: 679
89+
buildVersionToDownload: latest
90+
targetPath: '$(Pipeline.Workspace)/PythonSdkArtifact'
91+
condition: eq(variables['USETESTPYTHONSDK'], true)
92+
- bash: |
93+
python -m pip install --upgrade pip
94+
python -m pip install -e $(Pipeline.Workspace)/PythonSdkArtifact
95+
python -m pip install -U -e .[dev]
96+
97+
if [[ $(PYTHON_VERSION) != "3.7" ]]; then
98+
python -m pip install --pre -U -e .[test-http-v2]
99+
fi
100+
if [[ $(PYTHON_VERSION) != "3.7" && $(PYTHON_VERSION) != "3.8" ]]; then
101+
python -m pip install --pre -U -e .[test-deferred-bindings]
102+
fi
103+
104+
python setup.py build
105+
python setup.py webhost --branch-name=dev
106+
python setup.py extension
107+
displayName: 'Install test python sdk, dependencies and the worker'
108+
condition: eq(variables['USETESTPYTHONSDK'], true)
109+
- task: DownloadPipelineArtifact@2
110+
displayName: 'Download Python Extension Artifact'
111+
inputs:
112+
buildType: specific
113+
artifactName: $(PYTHONEXTENSIONNAME)
114+
project: 'internal'
115+
definition: 798
116+
buildVersionToDownload: latest
117+
targetPath: '$(Pipeline.Workspace)/PythonExtensionArtifact'
118+
condition: eq(variables['USETESTPYTHONEXTENSIONS'], true)
119+
- bash: |
120+
python -m pip install --upgrade pip
121+
122+
if [[ $(PYTHON_VERSION) != "3.7" ]]; then
123+
python -m pip install -e $(Pipeline.Workspace)/PythonExtensionArtifact
124+
python -m pip install --pre -U -e .[test-http-v2]
125+
fi
126+
if [[ $(PYTHON_VERSION) != "3.7" && $(PYTHON_VERSION) != "3.8" ]]; then
127+
python -m pip install -e $(Pipeline.Workspace)/PythonExtensionArtifact
128+
python -m pip install --pre -U -e .[test-deferred-bindings]
129+
fi
130+
131+
python -m pip install -U -e .[dev]
132+
133+
python setup.py build
134+
python setup.py webhost --branch-name=dev
135+
python setup.py extension
136+
displayName: 'Install test python extension, dependencies and the worker'
137+
condition: eq(variables['USETESTPYTHONEXTENSIONS'], true)
82138
- bash: |
83139
python -m pytest -q -n auto --dist loadfile --reruns 4 --cov=./azure_functions_worker --cov-report xml --cov-branch --cov-append tests/endtoend tests/extension_tests/deferred_bindings_tests tests/extension_tests/http_v2_tests
84140
env:
@@ -89,4 +145,5 @@ jobs:
89145
AzureWebJobsSqlConnectionString: $(SQL_CONNECTION)
90146
AzureWebJobsEventGridTopicUri: $(EVENTGRID_URI)
91147
AzureWebJobsEventGridConnectionKey: $(EVENTGRID_CONNECTION)
148+
USETESTPYTHONSDK: $(USETESTPYTHONSDK)
92149
displayName: "Running $(PYTHON_VERSION) Python E2E Tests"

tests/endtoend/test_dependency_isolation_functions.py

+2-1
Original file line numberDiff line numberDiff line change
@@ -118,14 +118,15 @@ def test_paths_resolution(self):
118118
).lower()
119119
)
120120

121+
@skipIf(is_envvar_true('USETESTPYTHONSDK'),
122+
'Running tests using an editable azure-functions package.')
121123
def test_loading_libraries_from_customers_package(self):
122124
"""Since the Python now loaded the customer's dependencies, the
123125
libraries version should match the ones in
124126
.python_packages_grpc_protobuf/ folder
125127
"""
126128
r: Response = self.webhost.request('GET', 'report_dependencies')
127129
libraries = r.json()['libraries']
128-
129130
self.assertEqual(
130131
libraries['proto.expected.version'], libraries['proto.version']
131132
)

0 commit comments

Comments
 (0)