-
Notifications
You must be signed in to change notification settings - Fork 108
test: run supported tests with emulators #1564
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
41 commits
Select commit
Hold shift + click to select a range
b6d16f6
run emulators for blob tests
6623726
Merge branch 'dev' into hallvictoria/emulators
hallvictoria c4e3529
Merge branch 'dev' of https://github.com/Azure/azure-functions-python…
76197a2
blob, table, queue working. large refactor
f813c1f
Merge branch 'hallvictoria/emulators' of https://github.com/Azure/azu…
9899abf
directory changes
hallvictoria e6226f7
fix: public build, generic table creation, eh config
4aa4547
docker-compose
5db919a
emulator support
hallvictoria 3ac2420
Merge branch 'hallvictoria/emulators' of https://github.com/Azure/azu…
hallvictoria a4bdeb2
skip eventhub metadata tests for 37
ea88ce4
Merge branch 'dev' into hallvictoria/emulators
hallvictoria 5d2c24a
run db blob tests in emulator
90ebd53
db blob tests dir change
8e27a26
Merge branch 'dev' of https://github.com/Azure/azure-functions-python…
f82778c
fix db test directory
67a0fa6
Merge branch 'dev' of https://github.com/Azure/azure-functions-python…
9775a97
merge
9675607
run emulator tests for 312
cd2bc31
remove git repo clone
984f819
refactor docker-compose, codeowners
9cfb04f
retries for flaky tests
572dfdd
Merge branch 'dev' into hallvictoria/emulators
hallvictoria a62cc7e
Merge branch 'dev' into hallvictoria/emulators
YunchuWang e7c9c25
Merge branch 'dev' into hallvictoria/emulators
hallvictoria 923cf7a
Merge branch 'dev' into hallvictoria/emulators
hallvictoria 10d7df4
Merge branch 'dev' into hallvictoria/emulators
hallvictoria 68f1a92
update codeowners
72941ff
Merge branch 'dev' of https://github.com/Azure/azure-functions-python…
hallvictoria f73ce51
run emulator tests on schedule, lowercase config
hallvictoria 37d0fbb
merge conflict
f3117c2
merge miss
a415089
merge miss
40ce8b4
Merge branch 'dev' of https://github.com/Azure/azure-functions-python…
5f6e2a9
move servicebus tests to emulators
7e3b79c
parameter miss
b262797
formatting
23ea45c
merge miss
584e8e4
lint
a150fe7
feedback
hallvictoria 463d4eb
container name
hallvictoria File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
trigger: none # ensure this is not ran as a CI build | ||
|
||
pr: | ||
branches: | ||
include: | ||
- dev | ||
- release/* | ||
|
||
schedules: | ||
- cron: "0 8 * * 1,2,3,4,5" | ||
displayName: Monday to Friday 3 AM CST build | ||
branches: | ||
include: | ||
- dev | ||
always: true | ||
|
||
resources: | ||
repositories: | ||
- repository: 1es | ||
type: git | ||
name: 1ESPipelineTemplates/1ESPipelineTemplates | ||
ref: refs/tags/release | ||
- repository: eng | ||
type: git | ||
name: engineering | ||
ref: refs/tags/release | ||
|
||
variables: | ||
- template: /ci/variables/build.yml@eng | ||
- template: /ci/variables/cfs.yml@eng | ||
- template: /eng/templates/utils/variables.yml@self | ||
|
||
extends: | ||
template: v1/1ES.Unofficial.PipelineTemplate.yml@1es | ||
parameters: | ||
pool: | ||
name: 1es-pool-azfunc | ||
image: 1es-windows-2022 | ||
os: windows | ||
|
||
stages: | ||
- stage: RunEmulatorTests | ||
jobs: | ||
- template: /eng/templates/jobs/ci-emulator-tests.yml@self | ||
parameters: | ||
PoolName: 1es-pool-azfunc |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,100 @@ | ||
jobs: | ||
- job: "TestPython" | ||
displayName: "Run Python Emulator Tests" | ||
|
||
pool: | ||
name: ${{ parameters.PoolName }} | ||
image: 1es-ubuntu-22.04 | ||
os: linux | ||
|
||
strategy: | ||
matrix: | ||
Python37: | ||
PYTHON_VERSION: '3.7' | ||
Python38: | ||
PYTHON_VERSION: '3.8' | ||
Python39: | ||
PYTHON_VERSION: '3.9' | ||
Python310: | ||
PYTHON_VERSION: '3.10' | ||
Python311: | ||
PYTHON_VERSION: '3.11' | ||
Python312: | ||
PYTHON_VERSION: '3.12' | ||
steps: | ||
- task: UsePythonVersion@0 | ||
inputs: | ||
versionSpec: $(PYTHON_VERSION) | ||
- task: UseDotNet@2 | ||
displayName: 'Install .NET 8' | ||
inputs: | ||
version: 8.0.x | ||
- bash: | | ||
chmod +x eng/scripts/install-dependencies.sh | ||
chmod +x eng/scripts/test-setup.sh | ||
|
||
eng/scripts/install-dependencies.sh $(PYTHON_VERSION) | ||
eng/scripts/test-setup.sh | ||
displayName: 'Install dependencies and the worker' | ||
condition: and(eq(variables.isSdkRelease, false), eq(variables.isExtensionsRelease, false), eq(variables['USETESTPYTHONSDK'], false), eq(variables['USETESTPYTHONEXTENSIONS'], false)) | ||
- task: DownloadPipelineArtifact@2 | ||
displayName: 'Download Python SDK Artifact' | ||
inputs: | ||
buildType: specific | ||
artifactName: 'azure-functions' | ||
project: 'internal' | ||
definition: 679 | ||
buildVersionToDownload: latest | ||
targetPath: '$(Pipeline.Workspace)/PythonSdkArtifact' | ||
condition: or(eq(variables.isSdkRelease, true), eq(variables['USETESTPYTHONSDK'], true)) | ||
- bash: | | ||
chmod +x eng/scripts/test-sdk.sh | ||
chmod +x eng/scripts/test-setup.sh | ||
|
||
eng/scripts/test-sdk.sh $(Pipeline.Workspace) $(PYTHON_VERSION) | ||
eng/scripts/test-setup.sh | ||
displayName: 'Install test python sdk, dependencies and the worker' | ||
condition: or(eq(variables.isSdkRelease, true), eq(variables['USETESTPYTHONSDK'], true)) | ||
- task: DownloadPipelineArtifact@2 | ||
displayName: 'Download Python Extension Artifact' | ||
inputs: | ||
buildType: specific | ||
artifactName: $(PYTHONEXTENSIONNAME) | ||
project: 'internal' | ||
definition: 798 | ||
buildVersionToDownload: latest | ||
targetPath: '$(Pipeline.Workspace)/PythonExtensionArtifact' | ||
condition: or(eq(variables.isExtensionsRelease, true), eq(variables['USETESTPYTHONEXTENSIONS'], true)) | ||
- bash: | | ||
chmod +x eng/scripts/test-setup.sh | ||
chmod +x eng/scripts/test-extensions.sh | ||
|
||
eng/scripts/test-extensions.sh $(Pipeline.Workspace) $(PYTHON_VERSION) | ||
eng/scripts/test-setup.sh | ||
displayName: 'Install test python extension, dependencies and the worker' | ||
condition: or(eq(variables.isExtensionsRelease, true), eq(variables['USETESTPYTHONEXTENSIONS'], true)) | ||
- bash: | | ||
docker compose -f tests/emulator_tests/utils/eventhub/docker-compose.yml pull | ||
docker compose -f tests/emulator_tests/utils/eventhub/docker-compose.yml up -d | ||
displayName: 'Install Azurite and Start EventHub Emulator' | ||
- bash: | | ||
python -m pytest -q -n auto --dist loadfile --reruns 4 --ignore=tests/emulator_tests/test_servicebus_functions.py tests/emulator_tests | ||
env: | ||
AzureWebJobsStorage: "UseDevelopmentStorage=true" | ||
AzureWebJobsEventHubConnectionString: "Endpoint=sb://localhost;SharedAccessKeyName=RootManageSharedAccessKey;SharedAccessKey=SAS_KEY_VALUE;UseDevelopmentEmulator=true;" | ||
displayName: "Running $(PYTHON_VERSION) Python Linux Emulator Tests" | ||
- bash: | | ||
# Stop and remove EventHub Emulator container to free up the port | ||
docker stop eventhubs-emulator | ||
docker container rm --force eventhubs-emulator | ||
docker compose -f tests/emulator_tests/utils/servicebus/docker-compose.yml pull | ||
docker compose -f tests/emulator_tests/utils/servicebus/docker-compose.yml up -d | ||
env: | ||
AzureWebJobsSQLPassword: $(AzureWebJobsSQLPassword) | ||
displayName: 'Install Azurite and Start ServiceBus Emulator' | ||
- bash: | | ||
python -m pytest -q -n auto --dist loadfile --reruns 4 tests/emulator_tests/test_servicebus_functions.py | ||
env: | ||
AzureWebJobsStorage: "UseDevelopmentStorage=true" | ||
AzureWebJobsServiceBusConnectionString: "Endpoint=sb://localhost;SharedAccessKeyName=RootManageSharedAccessKey;SharedAccessKey=SAS_KEY_VALUE;UseDevelopmentEmulator=true;" | ||
displayName: "Running $(PYTHON_VERSION) Python ServiceBus Linux Emulator Tests" |
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.