|
1 |
| -# This workflow will run all tests in endtoend/tests in a docker container using the latest dedicated image |
2 |
| - |
3 |
| -name: CI Docker Dedicated 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 |
| - issue_comment: |
12 |
| - types: [created, edited] |
13 |
| - |
14 |
| -jobs: |
15 |
| - build: |
16 |
| - name: "Python Docker CI Run" |
17 |
| - if: (github.event.issue.pull_request != '' && contains(github.event.comment.body, '/run-docker-tests to')) || github.event_name == 'schedule' |
18 |
| - runs-on: ubuntu-latest |
19 |
| - strategy: |
20 |
| - fail-fast: false |
21 |
| - matrix: |
22 |
| - python-version: [ 3.7, 3.8, 3.9, "3.10" ] |
23 |
| - env: |
24 |
| - DEDICATED_DOCKER_TEST: "true" |
25 |
| - |
26 |
| - steps: |
27 |
| - - name: Checkout code. |
28 |
| - uses: actions/checkout@v2 |
29 |
| - - name: Set up Python ${{ matrix.python-version }} |
30 |
| - uses: actions/setup-python@v2 |
31 |
| - with: |
32 |
| - python-version: ${{ matrix.python-version }} |
33 |
| - - name: Install dependencies |
34 |
| - run: | |
35 |
| - python -m pip install -U -e .[dev] |
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 --instafail --reruns 4 -vv 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 --instafail --reruns 4 -vv 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 --instafail --reruns 4 -vv 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 --instafail --reruns 4 -vv tests/endtoend |
84 |
| - - name: Codecov |
85 |
| - |
86 |
| - with: |
87 |
| - file: ./coverage.xml # optional |
88 |
| - flags: unittests # optional |
89 |
| - name: codecov # optional |
90 |
| - fail_ci_if_error: false # optional (default = false) |
| 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 -U -e .[dev] |
| 34 | + - name: Running 3.7 Tests |
| 35 | + if: matrix.python-version == 3.7 |
| 36 | + env: |
| 37 | + AzureWebJobsStorage: ${{ secrets.LinuxStorageConnectionString37 }} |
| 38 | + AzureWebJobsCosmosDBConnectionString: ${{ secrets.LinuxCosmosDBConnectionString37 }} |
| 39 | + AzureWebJobsEventHubConnectionString: ${{ secrets.LinuxEventHubConnectionString37 }} |
| 40 | + AzureWebJobsServiceBusConnectionString: ${{ secrets.LinuxServiceBusConnectionString37 }} |
| 41 | + AzureWebJobsSqlConnectionString: ${{ secrets.LinuxSqlConnectionString37 }} |
| 42 | + AzureWebJobsEventGridTopicUri: ${{ secrets.LinuxEventGridTopicUriString37 }} |
| 43 | + AzureWebJobsEventGridConnectionKey: ${{ secrets.LinuxEventGridConnectionKeyString37 }} |
| 44 | + run: | |
| 45 | + python -m pytest -n auto --instafail --cov=./azure_functions_worker --cov-report xml --cov-branch --cov-append tests/endtoend |
| 46 | + - name: Running 3.8 Tests |
| 47 | + if: matrix.python-version == 3.8 |
| 48 | + env: |
| 49 | + AzureWebJobsStorage: ${{ secrets.LinuxStorageConnectionString38 }} |
| 50 | + AzureWebJobsCosmosDBConnectionString: ${{ secrets.LinuxCosmosDBConnectionString38 }} |
| 51 | + AzureWebJobsEventHubConnectionString: ${{ secrets.LinuxEventHubConnectionString38 }} |
| 52 | + AzureWebJobsServiceBusConnectionString: ${{ secrets.LinuxServiceBusConnectionString38 }} |
| 53 | + AzureWebJobsSqlConnectionString: ${{ secrets.LinuxSqlConnectionString38 }} |
| 54 | + AzureWebJobsEventGridTopicUri: ${{ secrets.LinuxEventGridTopicUriString38 }} |
| 55 | + AzureWebJobsEventGridConnectionKey: ${{ secrets.LinuxEventGridConnectionKeyString38 }} |
| 56 | + run: | |
| 57 | + python -m pytest -n auto --instafail --cov=./azure_functions_worker --cov-report xml --cov-branch --cov-append tests/endtoend |
| 58 | + - name: Running 3.9 Tests |
| 59 | + if: matrix.python-version == 3.9 |
| 60 | + env: |
| 61 | + AzureWebJobsStorage: ${{ secrets.LinuxStorageConnectionString39 }} |
| 62 | + AzureWebJobsCosmosDBConnectionString: ${{ secrets.LinuxCosmosDBConnectionString39 }} |
| 63 | + AzureWebJobsEventHubConnectionString: ${{ secrets.LinuxEventHubConnectionString39 }} |
| 64 | + AzureWebJobsServiceBusConnectionString: ${{ secrets.LinuxServiceBusConnectionString39 }} |
| 65 | + AzureWebJobsSqlConnectionString: ${{ secrets.LinuxSqlConnectionString39 }} |
| 66 | + AzureWebJobsEventGridTopicUri: ${{ secrets.LinuxEventGridTopicUriString39 }} |
| 67 | + AzureWebJobsEventGridConnectionKey: ${{ secrets.LinuxEventGridConnectionKeyString39 }} |
| 68 | + run: | |
| 69 | + python -m pytest -n auto --instafail --cov=./azure_functions_worker --cov-report xml --cov-branch --cov-append tests/endtoend |
| 70 | + - name: Running 3.10 Tests |
| 71 | + if: matrix.python-version == 3.10 |
| 72 | + env: |
| 73 | + AzureWebJobsStorage: ${{ secrets.LinuxStorageConnectionString310 }} |
| 74 | + AzureWebJobsCosmosDBConnectionString: ${{ secrets.LinuxCosmosDBConnectionString310 }} |
| 75 | + AzureWebJobsEventHubConnectionString: ${{ secrets.LinuxEventHubConnectionString310 }} |
| 76 | + AzureWebJobsServiceBusConnectionString: ${{ secrets.LinuxServiceBusConnectionString310 }} |
| 77 | + AzureWebJobsSqlConnectionString: ${{ secrets.LinuxSqlConnectionString310 }} |
| 78 | + AzureWebJobsEventGridTopicUri: ${{ secrets.LinuxEventGridTopicUriString310 }} |
| 79 | + AzureWebJobsEventGridConnectionKey: ${{ secrets.LinuxEventGridConnectionKeyString310 }} |
| 80 | + run: | |
| 81 | + python -m pytest -n auto --instafail --cov=./azure_functions_worker --cov-report xml --cov-branch --cov-append tests/endtoend |
| 82 | + - name: Codecov |
| 83 | + |
| 84 | + with: |
| 85 | + file: ./coverage.xml # optional |
| 86 | + flags: unittests # optional |
| 87 | + name: codecov # optional |
| 88 | + fail_ci_if_error: false # optional (default = false) |
0 commit comments