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 diff --git a/.github/workflows/ci_e2e_workflow.yml b/.github/workflows/ci_e2e_workflow.yml index 9802783d4..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: @@ -75,8 +77,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: .github/Scripts/e2e-tests.sh - name: Running 3.8 Tests if: matrix.python-version == 3.8 env: @@ -87,8 +88,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: .github/Scripts/e2e-tests.sh - name: Running 3.9 Tests if: matrix.python-version == 3.9 env: @@ -99,8 +99,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: .github/Scripts/e2e-tests.sh - name: Running 3.10 Tests if: matrix.python-version == 3.10 env: @@ -111,8 +110,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: .github/Scripts/e2e-tests.sh - name: Running 3.11 Tests if: matrix.python-version == 3.11 env: @@ -123,8 +121,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: .github/Scripts/e2e-tests.sh - name: Codecov uses: codecov/codecov-action@v1.0.13 with: