1
+ # This workflow will run all tests in endtoend/tests in a docker container using custom dedicated or consumption image
2
+
3
+
4
+ name : CI Docker Custom tests
5
+
6
+ on :
7
+ workflow_dispatch :
8
+ inputs :
9
+ image_name :
10
+ description : ' Image'
11
+ required : true
12
+ python_version :
13
+ description : ' Python Version'
14
+ required : true
15
+ type : choice
16
+ default : ' 3.11'
17
+ options : [ '3.7', '3.8', '3.9', '3.10', '3.11' ]
18
+ DEDICATED_DOCKER_TEST :
19
+ description : ' Is this Dedicated Image?'
20
+ required : true
21
+ type : choice
22
+ default : ' true'
23
+ options : [ 'true', 'false' ]
24
+ CONSUMPTION_DOCKER_TEST :
25
+ description : ' Is this Consumption Image?'
26
+ required : true
27
+ type : choice
28
+ default : ' false'
29
+ options : [ 'true', 'false' ]
30
+
31
+ jobs :
32
+ build :
33
+ name : " Python Docker CI Run"
34
+ runs-on : ubuntu-latest
35
+ strategy :
36
+ fail-fast : false
37
+ env :
38
+ DEDICATED_DOCKER_TEST : ${{ github.event.inputs.DEDICATED_DOCKER_TEST }}
39
+ CONSUMPTION_DOCKER_TEST : ${{ github.event.inputs.CONSUMPTION_DOCKER_TEST }}
40
+ python_version : ${{ github.event.inputs.python_version }}
41
+ IMAGE_NAME : ${{ github.event.inputs.image_name }}
42
+ steps :
43
+ - name : Checkout code.
44
+ uses : actions/checkout@v2
45
+ - name : Set up Python ${{ env.python_version }}
46
+ uses : actions/setup-python@v2
47
+ with :
48
+ python-version : ${{ env.python_version }}
49
+ - name : Install dependencies
50
+ run : |
51
+ python -m pip install -U -e .[dev]
52
+ - name : Running 3.7 Tests
53
+ if : env.python_version == 3.7
54
+ env :
55
+ AzureWebJobsStorage : ${{ secrets.LinuxStorageConnectionString37 }}
56
+ AzureWebJobsCosmosDBConnectionString : ${{ secrets.LinuxCosmosDBConnectionString37 }}
57
+ AzureWebJobsEventHubConnectionString : ${{ secrets.LinuxEventHubConnectionString37 }}
58
+ AzureWebJobsServiceBusConnectionString : ${{ secrets.LinuxServiceBusConnectionString37 }}
59
+ AzureWebJobsSqlConnectionString : ${{ secrets.LinuxSqlConnectionString37 }}
60
+ AzureWebJobsEventGridTopicUri : ${{ secrets.LinuxEventGridTopicUriString37 }}
61
+ AzureWebJobsEventGridConnectionKey : ${{ secrets.LinuxEventGridConnectionKeyString37 }}
62
+ run : |
63
+ python -m pytest --dist loadfile --reruns 4 -vv --instafail tests/endtoend
64
+ - name : Running 3.8 Tests
65
+ if : env.python_version == 3.8
66
+ env :
67
+ AzureWebJobsStorage : ${{ secrets.LinuxStorageConnectionString38 }}
68
+ AzureWebJobsCosmosDBConnectionString : ${{ secrets.LinuxCosmosDBConnectionString38 }}
69
+ AzureWebJobsEventHubConnectionString : ${{ secrets.LinuxEventHubConnectionString38 }}
70
+ AzureWebJobsServiceBusConnectionString : ${{ secrets.LinuxServiceBusConnectionString38 }}
71
+ AzureWebJobsSqlConnectionString : ${{ secrets.LinuxSqlConnectionString38 }}
72
+ AzureWebJobsEventGridTopicUri : ${{ secrets.LinuxEventGridTopicUriString38 }}
73
+ AzureWebJobsEventGridConnectionKey : ${{ secrets.LinuxEventGridConnectionKeyString38 }}
74
+ run : |
75
+ python -m pytest --dist loadfile --reruns 4 -vv --instafail tests/endtoend
76
+ - name : Running 3.9 Tests
77
+ if : env.python_version == 3.9
78
+ env :
79
+ AzureWebJobsStorage : ${{ secrets.LinuxStorageConnectionString39 }}
80
+ AzureWebJobsCosmosDBConnectionString : ${{ secrets.LinuxCosmosDBConnectionString39 }}
81
+ AzureWebJobsEventHubConnectionString : ${{ secrets.LinuxEventHubConnectionString39 }}
82
+ AzureWebJobsServiceBusConnectionString : ${{ secrets.LinuxServiceBusConnectionString39 }}
83
+ AzureWebJobsSqlConnectionString : ${{ secrets.LinuxSqlConnectionString39 }}
84
+ AzureWebJobsEventGridTopicUri : ${{ secrets.LinuxEventGridTopicUriString39 }}
85
+ AzureWebJobsEventGridConnectionKey : ${{ secrets.LinuxEventGridConnectionKeyString39 }}
86
+ run : |
87
+ python -m pytest --dist loadfile --reruns 4 -vv --instafail tests/endtoend
88
+ - name : Running 3.10 Tests
89
+ if : env.python_version == 3.10
90
+ env :
91
+ AzureWebJobsStorage : ${{ secrets.LinuxStorageConnectionString310 }}
92
+ AzureWebJobsCosmosDBConnectionString : ${{ secrets.LinuxCosmosDBConnectionString310 }}
93
+ AzureWebJobsEventHubConnectionString : ${{ secrets.LinuxEventHubConnectionString310 }}
94
+ AzureWebJobsServiceBusConnectionString : ${{ secrets.LinuxServiceBusConnectionString310 }}
95
+ AzureWebJobsSqlConnectionString : ${{ secrets.LinuxSqlConnectionString310 }}
96
+ AzureWebJobsEventGridTopicUri : ${{ secrets.LinuxEventGridTopicUriString310 }}
97
+ AzureWebJobsEventGridConnectionKey : ${{ secrets.LinuxEventGridConnectionKeyString310 }}
98
+ run : |
99
+ python -m pytest --dist loadfile --reruns 4 -vv --instafail tests/endtoend
100
+ - name : Running 3.11 Tests
101
+ if : env.python_version == 3.11
102
+ env :
103
+ AzureWebJobsStorage : ${{ secrets.LinuxStorageConnectionString311 }}
104
+ AzureWebJobsCosmosDBConnectionString : ${{ secrets.LinuxCosmosDBConnectionString311 }}
105
+ AzureWebJobsEventHubConnectionString : ${{ secrets.LinuxEventHubConnectionString311 }}
106
+ AzureWebJobsServiceBusConnectionString : ${{ secrets.LinuxServiceBusConnectionString311 }}
107
+ AzureWebJobsSqlConnectionString : ${{ secrets.LinuxSqlConnectionString311 }}
108
+ AzureWebJobsEventGridTopicUri : ${{ secrets.LinuxEventGridTopicUriString311 }}
109
+ AzureWebJobsEventGridConnectionKey : ${{ secrets.LinuxEventGridConnectionKeyString311 }}
110
+ run : |
111
+ python -m pytest --dist loadfile --reruns 4 -vv --instafail tests/endtoend
0 commit comments