|
77 | 77 | python setup.py build
|
78 | 78 | python setup.py webhost --branch-name=dev
|
79 | 79 | python setup.py extension
|
80 |
| - mkdir logs |
81 | 80 | 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) |
82 | 138 | - bash: |
|
83 | 139 | 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
|
84 | 140 | env:
|
|
89 | 145 | AzureWebJobsSqlConnectionString: $(SQL_CONNECTION)
|
90 | 146 | AzureWebJobsEventGridTopicUri: $(EVENTGRID_URI)
|
91 | 147 | AzureWebJobsEventGridConnectionKey: $(EVENTGRID_CONNECTION)
|
| 148 | + USETESTPYTHONSDK: $(USETESTPYTHONSDK) |
92 | 149 | displayName: "Running $(PYTHON_VERSION) Python E2E Tests"
|
0 commit comments