-
Notifications
You must be signed in to change notification settings - Fork 105
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Adding workflow for testing custom dedicated or consumption image. (#…
…1186) * Adding workflow for testing custom image * update * Updated workflow file. * Updated files
- Loading branch information
Showing
1 changed file
with
111 additions
and
0 deletions.
There are no files selected for viewing
This file contains 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,111 @@ | ||
# This workflow will run all tests in endtoend/tests in a docker container using custom dedicated or consumption image | ||
|
||
|
||
name: CI Docker Custom tests | ||
|
||
on: | ||
workflow_dispatch: | ||
inputs: | ||
image_name: | ||
description: 'Image' | ||
required: true | ||
python_version: | ||
description: 'Python Version' | ||
required: true | ||
type: choice | ||
default: '3.11' | ||
options: [ '3.7', '3.8', '3.9', '3.10', '3.11' ] | ||
DEDICATED_DOCKER_TEST: | ||
description: 'Is this Dedicated Image?' | ||
required: true | ||
type: choice | ||
default: 'true' | ||
options: [ 'true', 'false' ] | ||
CONSUMPTION_DOCKER_TEST: | ||
description: 'Is this Consumption Image?' | ||
required: true | ||
type: choice | ||
default: 'false' | ||
options: [ 'true', 'false' ] | ||
|
||
jobs: | ||
build: | ||
name: "Python Docker CI Run" | ||
runs-on: ubuntu-latest | ||
strategy: | ||
fail-fast: false | ||
env: | ||
DEDICATED_DOCKER_TEST: ${{ github.event.inputs.DEDICATED_DOCKER_TEST }} | ||
CONSUMPTION_DOCKER_TEST: ${{ github.event.inputs.CONSUMPTION_DOCKER_TEST }} | ||
python_version: ${{ github.event.inputs.python_version }} | ||
IMAGE_NAME: ${{ github.event.inputs.image_name }} | ||
steps: | ||
- name: Checkout code. | ||
uses: actions/checkout@v2 | ||
- name: Set up Python ${{ env.python_version }} | ||
uses: actions/setup-python@v2 | ||
with: | ||
python-version: ${{ env.python_version }} | ||
- name: Install dependencies | ||
run: | | ||
python -m pip install -U -e .[dev] | ||
- name: Running 3.7 Tests | ||
if: env.python_version == 3.7 | ||
env: | ||
AzureWebJobsStorage: ${{ secrets.LinuxStorageConnectionString37 }} | ||
AzureWebJobsCosmosDBConnectionString: ${{ secrets.LinuxCosmosDBConnectionString37 }} | ||
AzureWebJobsEventHubConnectionString: ${{ secrets.LinuxEventHubConnectionString37 }} | ||
AzureWebJobsServiceBusConnectionString: ${{ secrets.LinuxServiceBusConnectionString37 }} | ||
AzureWebJobsSqlConnectionString: ${{ secrets.LinuxSqlConnectionString37 }} | ||
AzureWebJobsEventGridTopicUri: ${{ secrets.LinuxEventGridTopicUriString37 }} | ||
AzureWebJobsEventGridConnectionKey: ${{ secrets.LinuxEventGridConnectionKeyString37 }} | ||
run: | | ||
python -m pytest --dist loadfile --reruns 4 -vv --instafail tests/endtoend | ||
- name: Running 3.8 Tests | ||
if: env.python_version == 3.8 | ||
env: | ||
AzureWebJobsStorage: ${{ secrets.LinuxStorageConnectionString38 }} | ||
AzureWebJobsCosmosDBConnectionString: ${{ secrets.LinuxCosmosDBConnectionString38 }} | ||
AzureWebJobsEventHubConnectionString: ${{ secrets.LinuxEventHubConnectionString38 }} | ||
AzureWebJobsServiceBusConnectionString: ${{ secrets.LinuxServiceBusConnectionString38 }} | ||
AzureWebJobsSqlConnectionString: ${{ secrets.LinuxSqlConnectionString38 }} | ||
AzureWebJobsEventGridTopicUri: ${{ secrets.LinuxEventGridTopicUriString38 }} | ||
AzureWebJobsEventGridConnectionKey: ${{ secrets.LinuxEventGridConnectionKeyString38 }} | ||
run: | | ||
python -m pytest --dist loadfile --reruns 4 -vv --instafail tests/endtoend | ||
- name: Running 3.9 Tests | ||
if: env.python_version == 3.9 | ||
env: | ||
AzureWebJobsStorage: ${{ secrets.LinuxStorageConnectionString39 }} | ||
AzureWebJobsCosmosDBConnectionString: ${{ secrets.LinuxCosmosDBConnectionString39 }} | ||
AzureWebJobsEventHubConnectionString: ${{ secrets.LinuxEventHubConnectionString39 }} | ||
AzureWebJobsServiceBusConnectionString: ${{ secrets.LinuxServiceBusConnectionString39 }} | ||
AzureWebJobsSqlConnectionString: ${{ secrets.LinuxSqlConnectionString39 }} | ||
AzureWebJobsEventGridTopicUri: ${{ secrets.LinuxEventGridTopicUriString39 }} | ||
AzureWebJobsEventGridConnectionKey: ${{ secrets.LinuxEventGridConnectionKeyString39 }} | ||
run: | | ||
python -m pytest --dist loadfile --reruns 4 -vv --instafail tests/endtoend | ||
- name: Running 3.10 Tests | ||
if: env.python_version == 3.10 | ||
env: | ||
AzureWebJobsStorage: ${{ secrets.LinuxStorageConnectionString310 }} | ||
AzureWebJobsCosmosDBConnectionString: ${{ secrets.LinuxCosmosDBConnectionString310 }} | ||
AzureWebJobsEventHubConnectionString: ${{ secrets.LinuxEventHubConnectionString310 }} | ||
AzureWebJobsServiceBusConnectionString: ${{ secrets.LinuxServiceBusConnectionString310 }} | ||
AzureWebJobsSqlConnectionString: ${{ secrets.LinuxSqlConnectionString310 }} | ||
AzureWebJobsEventGridTopicUri: ${{ secrets.LinuxEventGridTopicUriString310 }} | ||
AzureWebJobsEventGridConnectionKey: ${{ secrets.LinuxEventGridConnectionKeyString310 }} | ||
run: | | ||
python -m pytest --dist loadfile --reruns 4 -vv --instafail tests/endtoend | ||
- name: Running 3.11 Tests | ||
if: env.python_version == 3.11 | ||
env: | ||
AzureWebJobsStorage: ${{ secrets.LinuxStorageConnectionString311 }} | ||
AzureWebJobsCosmosDBConnectionString: ${{ secrets.LinuxCosmosDBConnectionString311 }} | ||
AzureWebJobsEventHubConnectionString: ${{ secrets.LinuxEventHubConnectionString311 }} | ||
AzureWebJobsServiceBusConnectionString: ${{ secrets.LinuxServiceBusConnectionString311 }} | ||
AzureWebJobsSqlConnectionString: ${{ secrets.LinuxSqlConnectionString311 }} | ||
AzureWebJobsEventGridTopicUri: ${{ secrets.LinuxEventGridTopicUriString311 }} | ||
AzureWebJobsEventGridConnectionKey: ${{ secrets.LinuxEventGridConnectionKeyString311 }} | ||
run: | | ||
python -m pytest --dist loadfile --reruns 4 -vv --instafail tests/endtoend |