Skip to content

Commit 54c1e1b

Browse files
authored
Merge branch 'dev' into add_support_py3.11
2 parents 096ba8a + 02e5b12 commit 54c1e1b

File tree

82 files changed

+1007
-447
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

82 files changed

+1007
-447
lines changed

.ci/e2e_integration_test/pipeline.yml

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@ pool:
1111

1212
variables:
1313
DOTNET_VERSION: '3.1.x'
14-
DOTNET_VERSION_5: '5.0.x'
1514
DOTNET_VERSION_6: '6.x'
1615
PYTHON_VERSION: '3.9'
1716

@@ -26,11 +25,6 @@ steps:
2625
inputs:
2726
packageType: 'sdk'
2827
version: $(DOTNET_VERSION)
29-
- task: UseDotNet@2
30-
displayName: 'Install DotNet 5'
31-
inputs:
32-
packageType: 'sdk'
33-
version: $(DOTNET_VERSION_5)
3428
- task: UseDotNet@2
3529
displayName: 'Install DotNet 6'
3630
inputs:
Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
# This workflow will run all tests in tests/consumption_tests in Docker using a consumption image
2+
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions
3+
4+
name: CI Consumption tests
5+
6+
on:
7+
workflow_dispatch:
8+
push:
9+
branches: [ dev, master, main, release/* ]
10+
pull_request:
11+
branches: [ dev, master, main, release/* ]
12+
13+
jobs:
14+
build:
15+
name: "Python Consumption CI Run"
16+
runs-on: ubuntu-latest
17+
strategy:
18+
fail-fast: false
19+
matrix:
20+
python-version: [ 3.7, 3.8, 3.9, "3.10" ]
21+
22+
steps:
23+
- name: Checkout code.
24+
uses: actions/checkout@v2
25+
- name: Set up Python ${{ matrix.python-version }}
26+
uses: actions/setup-python@v2
27+
with:
28+
python-version: ${{ matrix.python-version }}
29+
- name: Install dependencies
30+
run: |
31+
python -m pip install --index-url https://test.pypi.org/simple/ --extra-index-url https://pypi.org/simple -U -e .[dev]
32+
python setup.py build
33+
python setup.py webhost --branch-name=dev
34+
python setup.py extension
35+
- name: Running 3.7 Tests
36+
if: matrix.python-version == 3.7
37+
env:
38+
AzureWebJobsStorage: ${{ secrets.LinuxStorageConnectionString37 }}
39+
run: python -m pytest -n auto --instafail tests/consumption_tests
40+
- name: Running 3.8 Tests
41+
if: matrix.python-version == 3.8
42+
env:
43+
AzureWebJobsStorage: ${{ secrets.LinuxStorageConnectionString38 }}
44+
run: python -m pytest -n auto --instafail tests/consumption_tests
45+
- name: Running 3.9 Tests
46+
if: matrix.python-version == 3.9
47+
env:
48+
AzureWebJobsStorage: ${{ secrets.LinuxStorageConnectionString39 }}
49+
run: python -m pytest -n auto --instafail tests/consumption_tests
50+
- name: Running 3.10 Tests
51+
if: matrix.python-version == 3.10
52+
env:
53+
AzureWebJobsStorage: ${{ secrets.LinuxStorageConnectionString310 }}
54+
run: python -m pytest -n auto --instafail tests/consumption_tests
Lines changed: 90 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,90 @@
1+
# This workflow will run all tests in endtoend/tests in a docker container using the latest consumption image
2+
3+
name: CI Docker Consumption tests
4+
5+
on:
6+
workflow_dispatch:
7+
schedule:
8+
# Monday to Thursday 1 AM PDT build
9+
# * is a special character in YAML so you have to quote this string
10+
- cron: "0 8 * * 1,2,3,4"
11+
12+
jobs:
13+
build:
14+
name: "Python Docker CI Run"
15+
runs-on: ubuntu-latest
16+
strategy:
17+
fail-fast: false
18+
matrix:
19+
python-version: [ 3.7, 3.8, 3.9, "3.10" ]
20+
env:
21+
CONSUMPTION_DOCKER_TEST: "true"
22+
23+
steps:
24+
- name: Checkout code.
25+
uses: actions/checkout@v2
26+
- name: Set up Python ${{ matrix.python-version }}
27+
uses: actions/setup-python@v2
28+
with:
29+
python-version: ${{ matrix.python-version }}
30+
- name: Install dependencies
31+
run: |
32+
python -m pip install --index-url https://test.pypi.org/simple/ --extra-index-url https://pypi.org/simple -U -e .[dev]
33+
python setup.py build
34+
python setup.py webhost --branch-name=dev
35+
python setup.py extension
36+
- name: Running 3.7 Tests
37+
if: matrix.python-version == 3.7
38+
env:
39+
AzureWebJobsStorage: ${{ secrets.LinuxStorageConnectionString37 }}
40+
AzureWebJobsCosmosDBConnectionString: ${{ secrets.LinuxCosmosDBConnectionString37 }}
41+
AzureWebJobsEventHubConnectionString: ${{ secrets.LinuxEventHubConnectionString37 }}
42+
AzureWebJobsServiceBusConnectionString: ${{ secrets.LinuxServiceBusConnectionString37 }}
43+
AzureWebJobsSqlConnectionString: ${{ secrets.LinuxSqlConnectionString37 }}
44+
AzureWebJobsEventGridTopicUri: ${{ secrets.LinuxEventGridTopicUriString37 }}
45+
AzureWebJobsEventGridConnectionKey: ${{ secrets.LinuxEventGridConnectionKeyString37 }}
46+
run: |
47+
python -m pytest -n auto --instafail --cov=./azure_functions_worker --cov-report xml --cov-branch --cov-append tests/endtoend
48+
- name: Running 3.8 Tests
49+
if: matrix.python-version == 3.8
50+
env:
51+
AzureWebJobsStorage: ${{ secrets.LinuxStorageConnectionString38 }}
52+
AzureWebJobsCosmosDBConnectionString: ${{ secrets.LinuxCosmosDBConnectionString38 }}
53+
AzureWebJobsEventHubConnectionString: ${{ secrets.LinuxEventHubConnectionString38 }}
54+
AzureWebJobsServiceBusConnectionString: ${{ secrets.LinuxServiceBusConnectionString38 }}
55+
AzureWebJobsSqlConnectionString: ${{ secrets.LinuxSqlConnectionString38 }}
56+
AzureWebJobsEventGridTopicUri: ${{ secrets.LinuxEventGridTopicUriString38 }}
57+
AzureWebJobsEventGridConnectionKey: ${{ secrets.LinuxEventGridConnectionKeyString38 }}
58+
run: |
59+
python -m pytest -n auto --instafail --cov=./azure_functions_worker --cov-report xml --cov-branch --cov-append tests/endtoend
60+
- name: Running 3.9 Tests
61+
if: matrix.python-version == 3.9
62+
env:
63+
AzureWebJobsStorage: ${{ secrets.LinuxStorageConnectionString39 }}
64+
AzureWebJobsCosmosDBConnectionString: ${{ secrets.LinuxCosmosDBConnectionString39 }}
65+
AzureWebJobsEventHubConnectionString: ${{ secrets.LinuxEventHubConnectionString39 }}
66+
AzureWebJobsServiceBusConnectionString: ${{ secrets.LinuxServiceBusConnectionString39 }}
67+
AzureWebJobsSqlConnectionString: ${{ secrets.LinuxSqlConnectionString39 }}
68+
AzureWebJobsEventGridTopicUri: ${{ secrets.LinuxEventGridTopicUriString39 }}
69+
AzureWebJobsEventGridConnectionKey: ${{ secrets.LinuxEventGridConnectionKeyString39 }}
70+
run: |
71+
python -m pytest -n auto --instafail --cov=./azure_functions_worker --cov-report xml --cov-branch --cov-append tests/endtoend
72+
- name: Running 3.10 Tests
73+
if: matrix.python-version == 3.10
74+
env:
75+
AzureWebJobsStorage: ${{ secrets.LinuxStorageConnectionString310 }}
76+
AzureWebJobsCosmosDBConnectionString: ${{ secrets.LinuxCosmosDBConnectionString310 }}
77+
AzureWebJobsEventHubConnectionString: ${{ secrets.LinuxEventHubConnectionString310 }}
78+
AzureWebJobsServiceBusConnectionString: ${{ secrets.LinuxServiceBusConnectionString310 }}
79+
AzureWebJobsSqlConnectionString: ${{ secrets.LinuxSqlConnectionString310 }}
80+
AzureWebJobsEventGridTopicUri: ${{ secrets.LinuxEventGridTopicUriString310 }}
81+
AzureWebJobsEventGridConnectionKey: ${{ secrets.LinuxEventGridConnectionKeyString310 }}
82+
run: |
83+
python -m pytest -n auto --instafail --cov=./azure_functions_worker --cov-report xml --cov-branch --cov-append tests/endtoend
84+
- name: Codecov
85+
uses: codecov/[email protected]
86+
with:
87+
file: ./coverage.xml # optional
88+
flags: unittests # optional
89+
name: codecov # optional
90+
fail_ci_if_error: false # optional (default = false)
Lines changed: 91 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,91 @@
1+
# This workflow will run all tests in endtoend/tests in a docker container using the latest dedicated image
2+
3+
4+
name: CI Docker Dedicated tests
5+
6+
on:
7+
workflow_dispatch:
8+
schedule:
9+
# Monday to Thursday 1 AM PDT build
10+
# * is a special character in YAML so you have to quote this string
11+
- cron: "0 8 * * 1,2,3,4"
12+
13+
jobs:
14+
build:
15+
name: "Python Docker CI Run"
16+
runs-on: ubuntu-latest
17+
strategy:
18+
fail-fast: false
19+
matrix:
20+
python-version: [ 3.7, 3.8, 3.9, "3.10" ]
21+
env:
22+
DEDICATED_DOCKER_TEST: "true"
23+
24+
steps:
25+
- name: Checkout code.
26+
uses: actions/checkout@v2
27+
- name: Set up Python ${{ matrix.python-version }}
28+
uses: actions/setup-python@v2
29+
with:
30+
python-version: ${{ matrix.python-version }}
31+
- name: Install dependencies
32+
run: |
33+
python -m pip install --index-url https://test.pypi.org/simple/ --extra-index-url https://pypi.org/simple -U -e .[dev]
34+
python setup.py build
35+
python setup.py webhost --branch-name=dev
36+
python setup.py extension
37+
- name: Running 3.7 Tests
38+
if: matrix.python-version == 3.7
39+
env:
40+
AzureWebJobsStorage: ${{ secrets.LinuxStorageConnectionString37 }}
41+
AzureWebJobsCosmosDBConnectionString: ${{ secrets.LinuxCosmosDBConnectionString37 }}
42+
AzureWebJobsEventHubConnectionString: ${{ secrets.LinuxEventHubConnectionString37 }}
43+
AzureWebJobsServiceBusConnectionString: ${{ secrets.LinuxServiceBusConnectionString37 }}
44+
AzureWebJobsSqlConnectionString: ${{ secrets.LinuxSqlConnectionString37 }}
45+
AzureWebJobsEventGridTopicUri: ${{ secrets.LinuxEventGridTopicUriString37 }}
46+
AzureWebJobsEventGridConnectionKey: ${{ secrets.LinuxEventGridConnectionKeyString37 }}
47+
run: |
48+
python -m pytest -n auto --instafail --cov=./azure_functions_worker --cov-report xml --cov-branch --cov-append tests/endtoend
49+
- name: Running 3.8 Tests
50+
if: matrix.python-version == 3.8
51+
env:
52+
AzureWebJobsStorage: ${{ secrets.LinuxStorageConnectionString38 }}
53+
AzureWebJobsCosmosDBConnectionString: ${{ secrets.LinuxCosmosDBConnectionString38 }}
54+
AzureWebJobsEventHubConnectionString: ${{ secrets.LinuxEventHubConnectionString38 }}
55+
AzureWebJobsServiceBusConnectionString: ${{ secrets.LinuxServiceBusConnectionString38 }}
56+
AzureWebJobsSqlConnectionString: ${{ secrets.LinuxSqlConnectionString38 }}
57+
AzureWebJobsEventGridTopicUri: ${{ secrets.LinuxEventGridTopicUriString38 }}
58+
AzureWebJobsEventGridConnectionKey: ${{ secrets.LinuxEventGridConnectionKeyString38 }}
59+
run: |
60+
python -m pytest -n auto --instafail --cov=./azure_functions_worker --cov-report xml --cov-branch --cov-append tests/endtoend
61+
- name: Running 3.9 Tests
62+
if: matrix.python-version == 3.9
63+
env:
64+
AzureWebJobsStorage: ${{ secrets.LinuxStorageConnectionString39 }}
65+
AzureWebJobsCosmosDBConnectionString: ${{ secrets.LinuxCosmosDBConnectionString39 }}
66+
AzureWebJobsEventHubConnectionString: ${{ secrets.LinuxEventHubConnectionString39 }}
67+
AzureWebJobsServiceBusConnectionString: ${{ secrets.LinuxServiceBusConnectionString39 }}
68+
AzureWebJobsSqlConnectionString: ${{ secrets.LinuxSqlConnectionString39 }}
69+
AzureWebJobsEventGridTopicUri: ${{ secrets.LinuxEventGridTopicUriString39 }}
70+
AzureWebJobsEventGridConnectionKey: ${{ secrets.LinuxEventGridConnectionKeyString39 }}
71+
run: |
72+
python -m pytest -n auto --instafail --cov=./azure_functions_worker --cov-report xml --cov-branch --cov-append tests/endtoend
73+
- name: Running 3.10 Tests
74+
if: matrix.python-version == 3.10
75+
env:
76+
AzureWebJobsStorage: ${{ secrets.LinuxStorageConnectionString310 }}
77+
AzureWebJobsCosmosDBConnectionString: ${{ secrets.LinuxCosmosDBConnectionString310 }}
78+
AzureWebJobsEventHubConnectionString: ${{ secrets.LinuxEventHubConnectionString310 }}
79+
AzureWebJobsServiceBusConnectionString: ${{ secrets.LinuxServiceBusConnectionString310 }}
80+
AzureWebJobsSqlConnectionString: ${{ secrets.LinuxSqlConnectionString310 }}
81+
AzureWebJobsEventGridTopicUri: ${{ secrets.LinuxEventGridTopicUriString310 }}
82+
AzureWebJobsEventGridConnectionKey: ${{ secrets.LinuxEventGridConnectionKeyString310 }}
83+
run: |
84+
python -m pytest -n auto --instafail --cov=./azure_functions_worker --cov-report xml --cov-branch --cov-append tests/endtoend
85+
- name: Codecov
86+
uses: codecov/[email protected]
87+
with:
88+
file: ./coverage.xml # optional
89+
flags: unittests # optional
90+
name: codecov # optional
91+
fail_ci_if_error: false # optional (default = false)

.github/workflows/ci_e2e_workflow.yml

Lines changed: 4 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -34,10 +34,6 @@ jobs:
3434
uses: actions/setup-dotnet@v1
3535
with:
3636
dotnet-version: '3.1.x'
37-
- name: Set up Dotnet 5.0.x
38-
uses: actions/setup-dotnet@v1
39-
with:
40-
dotnet-version: '5.0.x'
4137
- name: Set up Dotnet 6.x
4238
uses: actions/setup-dotnet@v1
4339
with:
@@ -69,18 +65,6 @@ jobs:
6965
retry 5 python setup.py build
7066
retry 5 python setup.py webhost --branch-name=dev
7167
retry 5 python setup.py extension
72-
- name: Running 3.6 Tests
73-
if: matrix.python-version == 3.6
74-
env:
75-
AzureWebJobsStorage: ${{ secrets.LinuxStorageConnectionString36 }}
76-
AzureWebJobsCosmosDBConnectionString: ${{ secrets.LinuxCosmosDBConnectionString36 }}
77-
AzureWebJobsEventHubConnectionString: ${{ secrets.LinuxEventHubConnectionString36 }}
78-
AzureWebJobsServiceBusConnectionString: ${{ secrets.LinuxServiceBusConnectionString36 }}
79-
AzureWebJobsSqlConnectionString: ${{ secrets.LinuxSqlConnectionString36 }}
80-
AzureWebJobsEventGridTopicUri: ${{ secrets.LinuxEventGridTopicUriString36 }}
81-
AzureWebJobsEventGridConnectionKey: ${{ secrets.LinuxEventGridConnectionKeyString36 }}
82-
run: |
83-
python -m pytest --instafail --cov=./azure_functions_worker --cov-report xml --cov-branch --cov-append tests/endtoend
8468
- name: Running 3.7 Tests
8569
if: matrix.python-version == 3.7
8670
env:
@@ -92,7 +76,7 @@ jobs:
9276
AzureWebJobsEventGridTopicUri: ${{ secrets.LinuxEventGridTopicUriString37 }}
9377
AzureWebJobsEventGridConnectionKey: ${{ secrets.LinuxEventGridConnectionKeyString37 }}
9478
run: |
95-
python -m pytest --instafail --cov=./azure_functions_worker --cov-report xml --cov-branch --cov-append tests/endtoend
79+
python -m pytest -n auto --instafail --cov=./azure_functions_worker --cov-report xml --cov-branch --cov-append tests/endtoend
9680
- name: Running 3.8 Tests
9781
if: matrix.python-version == 3.8
9882
env:
@@ -104,7 +88,7 @@ jobs:
10488
AzureWebJobsEventGridTopicUri: ${{ secrets.LinuxEventGridTopicUriString38 }}
10589
AzureWebJobsEventGridConnectionKey: ${{ secrets.LinuxEventGridConnectionKeyString38 }}
10690
run: |
107-
python -m pytest --instafail --cov=./azure_functions_worker --cov-report xml --cov-branch --cov-append tests/endtoend
91+
python -m pytest -n auto --instafail --cov=./azure_functions_worker --cov-report xml --cov-branch --cov-append tests/endtoend
10892
- name: Running 3.9 Tests
10993
if: matrix.python-version == 3.9
11094
env:
@@ -116,7 +100,7 @@ jobs:
116100
AzureWebJobsEventGridTopicUri: ${{ secrets.LinuxEventGridTopicUriString39 }}
117101
AzureWebJobsEventGridConnectionKey: ${{ secrets.LinuxEventGridConnectionKeyString39 }}
118102
run: |
119-
python -m pytest --instafail --cov=./azure_functions_worker --cov-report xml --cov-branch --cov-append tests/endtoend
103+
python -m pytest -n auto --instafail --cov=./azure_functions_worker --cov-report xml --cov-branch --cov-append tests/endtoend
120104
- name: Running 3.10 Tests
121105
if: matrix.python-version == 3.10
122106
env:
@@ -128,7 +112,7 @@ jobs:
128112
AzureWebJobsEventGridTopicUri: ${{ secrets.LinuxEventGridTopicUriString310 }}
129113
AzureWebJobsEventGridConnectionKey: ${{ secrets.LinuxEventGridConnectionKeyString310 }}
130114
run: |
131-
python -m pytest --instafail --cov=./azure_functions_worker --cov-report xml --cov-branch --cov-append tests/endtoend
115+
python -m pytest -n auto --instafail --cov=./azure_functions_worker --cov-report xml --cov-branch --cov-append tests/endtoend
132116
- name: Codecov
133117
uses: codecov/[email protected]
134118
with:

.github/workflows/ut_ci_workflow.yml renamed to .github/workflows/ci_ut_workflow.yml

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ jobs:
1818
name: "Python UT CI Run"
1919
runs-on: ubuntu-latest
2020
strategy:
21-
fail-fast: true
21+
fail-fast: false
2222
matrix:
2323
python-version: [ 3.7, 3.8, 3.9, "3.10" ]
2424
steps:
@@ -31,10 +31,6 @@ jobs:
3131
uses: actions/setup-dotnet@v1
3232
with:
3333
dotnet-version: '3.1.x'
34-
- name: Set up Dotnet 5.0.x
35-
uses: actions/setup-dotnet@v1
36-
with:
37-
dotnet-version: '5.0.x'
3834
- name: Set up Dotnet 6.x
3935
uses: actions/setup-dotnet@v1
4036
with:
@@ -68,11 +64,11 @@ jobs:
6864
retry 5 python setup.py extension
6965
- name: Test with pytest
7066
env:
71-
AzureWebJobsStorage: ${{ secrets.LinuxStorageConnectionString310 }}
67+
AzureWebJobsStorage: ${{ secrets.LinuxStorageConnectionString310 }} # needed for installing azure-functions-durable while running setup.py
7268
run: |
73-
python -m pytest --instafail --cov=./azure_functions_worker --cov-report xml --cov-branch tests/unittests
69+
python -m pytest -n auto --instafail --cov=./azure_functions_worker --cov-report xml --cov-branch tests/unittests
7470
- name: Codecov
75-
uses: codecov/codecov-action@v1.0.13
71+
uses: codecov/codecov-action@v3
7672
with:
7773
file: ./coverage.xml # optional
7874
flags: unittests # optional

.github/workflows/codeql-analysis.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ name: "CodeQL"
1313

1414
on:
1515
push:
16-
branches: [ dev, *dev, main*, release* ]
16+
branches: [ dev, v3.x-dev, main*, release* ]
1717
pull_request:
1818
# The branches below must be a subset of the branches above
1919
branches: [ dev ]
@@ -32,7 +32,7 @@ jobs:
3232
strategy:
3333
fail-fast: false
3434
matrix:
35-
language: [ 'javascript', 'python' ]
35+
language: [ 'python' ]
3636
# CodeQL supports [ 'cpp', 'csharp', 'go', 'java', 'javascript', 'python', 'ruby' ]
3737
# Learn more about CodeQL language support at https://git.io/codeql-language-support
3838

.github/workflows/ogf_workflow.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ jobs:
8181
- name: Install node and npm
8282
uses: actions/setup-node@v2
8383
with:
84-
node-version: '12'
84+
node-version: '16'
8585
check-latest: true
8686

8787
- name: Azure Login

.github/workflows/perf-testing-setup.yml

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -27,10 +27,6 @@ jobs:
2727
uses: actions/setup-dotnet@v1
2828
with:
2929
dotnet-version: '3.1.405'
30-
- name: Set up Dotnet 5.0.x
31-
uses: actions/setup-dotnet@v1
32-
with:
33-
dotnet-version: '5.0.x'
3430
- name: Set up Dotnet 6.x
3531
uses: actions/setup-dotnet@v1
3632
with:

0 commit comments

Comments
 (0)