From e1014df32ce341af8e66cce09b51f971469718a9 Mon Sep 17 00:00:00 2001 From: pthummar Date: Fri, 23 Jun 2023 14:51:33 -0500 Subject: [PATCH 1/5] Updating tests --- .github/workflows/ci_e2e_workflow.yml | 15 +++++---------- 1 file changed, 5 insertions(+), 10 deletions(-) diff --git a/.github/workflows/ci_e2e_workflow.yml b/.github/workflows/ci_e2e_workflow.yml index 9802783d4..659d94f7d 100644 --- a/.github/workflows/ci_e2e_workflow.yml +++ b/.github/workflows/ci_e2e_workflow.yml @@ -75,8 +75,7 @@ jobs: AzureWebJobsSqlConnectionString: ${{ secrets.LinuxSqlConnectionString37 }} AzureWebJobsEventGridTopicUri: ${{ secrets.LinuxEventGridTopicUriString37 }} AzureWebJobsEventGridConnectionKey: ${{ secrets.LinuxEventGridConnectionKeyString37 }} - run: | - python -m pytest -n auto --dist loadfile --reruns 4 -vv --instafail --cov=./azure_functions_worker --cov-report xml --cov-branch --cov-append tests/endtoend + run: bash $ {GITHUB_WORKSPACE}/scripts/e2e-tests.sh - name: Running 3.8 Tests if: matrix.python-version == 3.8 env: @@ -87,8 +86,7 @@ jobs: AzureWebJobsSqlConnectionString: ${{ secrets.LinuxSqlConnectionString38 }} AzureWebJobsEventGridTopicUri: ${{ secrets.LinuxEventGridTopicUriString38 }} AzureWebJobsEventGridConnectionKey: ${{ secrets.LinuxEventGridConnectionKeyString38 }} - run: | - python -m pytest -n auto --dist loadfile --reruns 4 -vv --instafail --cov=./azure_functions_worker --cov-report xml --cov-branch --cov-append tests/endtoend + run: bash $ {GITHUB_WORKSPACE}/scripts/e2e-tests.sh - name: Running 3.9 Tests if: matrix.python-version == 3.9 env: @@ -99,8 +97,7 @@ jobs: AzureWebJobsSqlConnectionString: ${{ secrets.LinuxSqlConnectionString39 }} AzureWebJobsEventGridTopicUri: ${{ secrets.LinuxEventGridTopicUriString39 }} AzureWebJobsEventGridConnectionKey: ${{ secrets.LinuxEventGridConnectionKeyString39 }} - run: | - python -m pytest -n auto --dist loadfile --reruns 4 -vv --instafail --cov=./azure_functions_worker --cov-report xml --cov-branch --cov-append tests/endtoend + run: bash $ {GITHUB_WORKSPACE}/scripts/e2e-tests.sh - name: Running 3.10 Tests if: matrix.python-version == 3.10 env: @@ -111,8 +108,7 @@ jobs: AzureWebJobsSqlConnectionString: ${{ secrets.LinuxSqlConnectionString310 }} AzureWebJobsEventGridTopicUri: ${{ secrets.LinuxEventGridTopicUriString310 }} AzureWebJobsEventGridConnectionKey: ${{ secrets.LinuxEventGridConnectionKeyString310 }} - run: | - python -m pytest -n auto --dist loadfile --reruns 4 -vv --instafail --cov=./azure_functions_worker --cov-report xml --cov-branch --cov-append tests/endtoend + run: bash $ {GITHUB_WORKSPACE}/scripts/e2e-tests.sh - name: Running 3.11 Tests if: matrix.python-version == 3.11 env: @@ -123,8 +119,7 @@ jobs: AzureWebJobsSqlConnectionString: ${{ secrets.LinuxSqlConnectionString311 }} AzureWebJobsEventGridTopicUri: ${{ secrets.LinuxEventGridTopicUriString311 }} AzureWebJobsEventGridConnectionKey: ${{ secrets.LinuxEventGridConnectionKeyString311 }} - run: | - python -m pytest -n auto --dist loadfile --reruns 4 -vv --instafail --cov=./azure_functions_worker --cov-report xml --cov-branch --cov-append tests/endtoend + run: bash $ {GITHUB_WORKSPACE}/scripts/e2e-tests.sh - name: Codecov uses: codecov/codecov-action@v1.0.13 with: From fb3019673489535d05e75fd56a6436a8eacadafb Mon Sep 17 00:00:00 2001 From: pthummar Date: Fri, 23 Jun 2023 14:52:28 -0500 Subject: [PATCH 2/5] Using shell script to run tests --- .github/Scripts/e2e-tests.sh | 3 +++ 1 file changed, 3 insertions(+) create mode 100644 .github/Scripts/e2e-tests.sh diff --git a/.github/Scripts/e2e-tests.sh b/.github/Scripts/e2e-tests.sh new file mode 100644 index 000000000..f1c651f8b --- /dev/null +++ b/.github/Scripts/e2e-tests.sh @@ -0,0 +1,3 @@ +#!/usr/bin/env bash +python -m pytest -n auto --dist loadfile --reruns 4 -vv --instafail --cov=./azure_functions_worker --cov-report xml --cov-branch --cov-append tests/endtoend/test_worker_process_count_functions.py tests/endtoend/test_threadpool_thread_count_functions.py +python -m pytest -n auto --dist loadfile --reruns 4 -vv --instafail --cov=./azure_functions_worker --cov-report xml --cov-branch --cov-append --ignore=tests/endtoend/test_worker_process_count_functions.py --ignore=tests/endtoend/test_threadpool_thread_count_functions.py tests/endtoend \ No newline at end of file From 340dd606f339660c4ca4e2d1ab628835c4e3fe6a Mon Sep 17 00:00:00 2001 From: pthummar Date: Fri, 23 Jun 2023 15:04:46 -0500 Subject: [PATCH 3/5] updating WF --- .github/workflows/ci_e2e_workflow.yml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/ci_e2e_workflow.yml b/.github/workflows/ci_e2e_workflow.yml index 659d94f7d..507b30171 100644 --- a/.github/workflows/ci_e2e_workflow.yml +++ b/.github/workflows/ci_e2e_workflow.yml @@ -75,7 +75,7 @@ jobs: AzureWebJobsSqlConnectionString: ${{ secrets.LinuxSqlConnectionString37 }} AzureWebJobsEventGridTopicUri: ${{ secrets.LinuxEventGridTopicUriString37 }} AzureWebJobsEventGridConnectionKey: ${{ secrets.LinuxEventGridConnectionKeyString37 }} - run: bash $ {GITHUB_WORKSPACE}/scripts/e2e-tests.sh + run: bash $ {GITHUB_WORKSPACE}/Scripts/e2e-tests.sh - name: Running 3.8 Tests if: matrix.python-version == 3.8 env: @@ -86,7 +86,7 @@ jobs: AzureWebJobsSqlConnectionString: ${{ secrets.LinuxSqlConnectionString38 }} AzureWebJobsEventGridTopicUri: ${{ secrets.LinuxEventGridTopicUriString38 }} AzureWebJobsEventGridConnectionKey: ${{ secrets.LinuxEventGridConnectionKeyString38 }} - run: bash $ {GITHUB_WORKSPACE}/scripts/e2e-tests.sh + run: bash $ {GITHUB_WORKSPACE}/Scripts/e2e-tests.sh - name: Running 3.9 Tests if: matrix.python-version == 3.9 env: @@ -97,7 +97,7 @@ jobs: AzureWebJobsSqlConnectionString: ${{ secrets.LinuxSqlConnectionString39 }} AzureWebJobsEventGridTopicUri: ${{ secrets.LinuxEventGridTopicUriString39 }} AzureWebJobsEventGridConnectionKey: ${{ secrets.LinuxEventGridConnectionKeyString39 }} - run: bash $ {GITHUB_WORKSPACE}/scripts/e2e-tests.sh + run: bash $ {GITHUB_WORKSPACE}/Scripts/e2e-tests.sh - name: Running 3.10 Tests if: matrix.python-version == 3.10 env: @@ -108,7 +108,7 @@ jobs: AzureWebJobsSqlConnectionString: ${{ secrets.LinuxSqlConnectionString310 }} AzureWebJobsEventGridTopicUri: ${{ secrets.LinuxEventGridTopicUriString310 }} AzureWebJobsEventGridConnectionKey: ${{ secrets.LinuxEventGridConnectionKeyString310 }} - run: bash $ {GITHUB_WORKSPACE}/scripts/e2e-tests.sh + run: bash $ {GITHUB_WORKSPACE}/Scripts/e2e-tests.sh - name: Running 3.11 Tests if: matrix.python-version == 3.11 env: @@ -119,7 +119,7 @@ jobs: AzureWebJobsSqlConnectionString: ${{ secrets.LinuxSqlConnectionString311 }} AzureWebJobsEventGridTopicUri: ${{ secrets.LinuxEventGridTopicUriString311 }} AzureWebJobsEventGridConnectionKey: ${{ secrets.LinuxEventGridConnectionKeyString311 }} - run: bash $ {GITHUB_WORKSPACE}/scripts/e2e-tests.sh + run: bash $ {GITHUB_WORKSPACE}/Scripts/e2e-tests.sh - name: Codecov uses: codecov/codecov-action@v1.0.13 with: From c2eab3b2c28a9cb15dc6e3ce6aa261cf91dc4264 Mon Sep 17 00:00:00 2001 From: pthummar Date: Fri, 23 Jun 2023 15:27:49 -0500 Subject: [PATCH 4/5] updating workflow --- .github/workflows/ci_e2e_workflow.yml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/ci_e2e_workflow.yml b/.github/workflows/ci_e2e_workflow.yml index 507b30171..2332af841 100644 --- a/.github/workflows/ci_e2e_workflow.yml +++ b/.github/workflows/ci_e2e_workflow.yml @@ -75,7 +75,7 @@ jobs: AzureWebJobsSqlConnectionString: ${{ secrets.LinuxSqlConnectionString37 }} AzureWebJobsEventGridTopicUri: ${{ secrets.LinuxEventGridTopicUriString37 }} AzureWebJobsEventGridConnectionKey: ${{ secrets.LinuxEventGridConnectionKeyString37 }} - run: bash $ {GITHUB_WORKSPACE}/Scripts/e2e-tests.sh + run: .github/Scripts/e2e-tests.sh - name: Running 3.8 Tests if: matrix.python-version == 3.8 env: @@ -86,7 +86,7 @@ jobs: AzureWebJobsSqlConnectionString: ${{ secrets.LinuxSqlConnectionString38 }} AzureWebJobsEventGridTopicUri: ${{ secrets.LinuxEventGridTopicUriString38 }} AzureWebJobsEventGridConnectionKey: ${{ secrets.LinuxEventGridConnectionKeyString38 }} - run: bash $ {GITHUB_WORKSPACE}/Scripts/e2e-tests.sh + run: .github/Scripts/e2e-tests.sh - name: Running 3.9 Tests if: matrix.python-version == 3.9 env: @@ -97,7 +97,7 @@ jobs: AzureWebJobsSqlConnectionString: ${{ secrets.LinuxSqlConnectionString39 }} AzureWebJobsEventGridTopicUri: ${{ secrets.LinuxEventGridTopicUriString39 }} AzureWebJobsEventGridConnectionKey: ${{ secrets.LinuxEventGridConnectionKeyString39 }} - run: bash $ {GITHUB_WORKSPACE}/Scripts/e2e-tests.sh + run: .github/Scripts/e2e-tests.sh - name: Running 3.10 Tests if: matrix.python-version == 3.10 env: @@ -108,7 +108,7 @@ jobs: AzureWebJobsSqlConnectionString: ${{ secrets.LinuxSqlConnectionString310 }} AzureWebJobsEventGridTopicUri: ${{ secrets.LinuxEventGridTopicUriString310 }} AzureWebJobsEventGridConnectionKey: ${{ secrets.LinuxEventGridConnectionKeyString310 }} - run: bash $ {GITHUB_WORKSPACE}/Scripts/e2e-tests.sh + run: .github/Scripts/e2e-tests.sh - name: Running 3.11 Tests if: matrix.python-version == 3.11 env: @@ -119,7 +119,7 @@ jobs: AzureWebJobsSqlConnectionString: ${{ secrets.LinuxSqlConnectionString311 }} AzureWebJobsEventGridTopicUri: ${{ secrets.LinuxEventGridTopicUriString311 }} AzureWebJobsEventGridConnectionKey: ${{ secrets.LinuxEventGridConnectionKeyString311 }} - run: bash $ {GITHUB_WORKSPACE}/Scripts/e2e-tests.sh + run: .github/Scripts/e2e-tests.sh - name: Codecov uses: codecov/codecov-action@v1.0.13 with: From 35dead460ae875ac6f27cd20358bb94c3de00818 Mon Sep 17 00:00:00 2001 From: pthummar Date: Fri, 23 Jun 2023 15:45:36 -0500 Subject: [PATCH 5/5] grant execute permission --- .github/workflows/ci_e2e_workflow.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/ci_e2e_workflow.yml b/.github/workflows/ci_e2e_workflow.yml index 2332af841..8138121da 100644 --- a/.github/workflows/ci_e2e_workflow.yml +++ b/.github/workflows/ci_e2e_workflow.yml @@ -65,6 +65,8 @@ jobs: retry 5 python setup.py build retry 5 python setup.py webhost --branch-name=dev retry 5 python setup.py extension + - name: Grant execute permission + run: chmod +x .github/Scripts/e2e-tests.sh - name: Running 3.7 Tests if: matrix.python-version == 3.7 env: