Skip to content

Docker tests fixes to install dependencies #1461

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 10 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 5 additions & 4 deletions .github/workflows/ci_consumption_workflow.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,21 +32,22 @@ jobs:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
python -m pip install --index-url https://test.pypi.org/simple/ --extra-index-url https://pypi.org/simple -U azure-functions --pre
python -m pip install -U -e .[dev]
python -m pip install --upgrade pip==23.0
python -m pip install -r requirements.txt
python -m pip install pytest pytest-instafail pytest-rerunfailures pytest-xdist requests pycryptodome
python setup.py build
- name: Running 3.7 Tests
if: matrix.python-version == 3.7
env:
AzureWebJobsStorage: ${{ secrets.LinuxStorageConnectionString37 }}
CUSTOM_IMAGE: ${{ github.event.inputs.custom_image }}
run: python -m pytest -n auto --dist loadfile -vv --reruns 4 --instafail tests/consumption_tests
run: python -m pytest -n auto --dist loadfile -vv --reruns 4 --instafail tests/consumption_tests
- name: Running 3.8 Tests
if: matrix.python-version == 3.8
env:
AzureWebJobsStorage: ${{ secrets.LinuxStorageConnectionString38 }}
CUSTOM_IMAGE: ${{ github.event.inputs.custom_image }}
run: python -m pytest -n auto --dist loadfile -vv --reruns 4 --instafail tests/consumption_tests
run: python -m pytest -n auto --dist loadfile -vv --reruns 4 --instafail tests/consumption_tests
- name: Running 3.9 Tests
if: matrix.python-version == 3.9
env:
Expand Down
3 changes: 3 additions & 0 deletions .github/workflows/ci_docker_con_workflow.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,9 @@ jobs:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip==23.0
python -m pip install -r requirements.txt
python -m pip install pytest pytest-instafail pytest-rerunfailures pytest-xdist requests
python setup.py build
- name: Running 3.7 Tests
if: matrix.python-version == 3.7
Expand Down
3 changes: 3 additions & 0 deletions .github/workflows/ci_docker_custom_workflow.yml
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,9 @@ jobs:
python-version: ${{ env.python_version }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip==23.0
python -m pip install -r requirements.txt
python -m pip install pytest pytest-instafail pytest-rerunfailures pytest-xdist requests
python setup.py build
- name: Running 3.7 Tests
if: env.python_version == 3.7
Expand Down
3 changes: 3 additions & 0 deletions .github/workflows/ci_docker_ded_workflow.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,9 @@ jobs:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip==23.0
python -m pip install -r requirements.txt
python -m pip install pytest pytest-instafail pytest-rerunfailures pytest-xdist requests
python setup.py build
- name: Running 3.7 Tests
if: matrix.python-version == 3.7
Expand Down
15 changes: 7 additions & 8 deletions tests/endtoend/test_worker_process_count_functions.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,16 +18,15 @@ def setUpClass(cls):
cls.env_variables['PYTHON_THREADPOOL_THREAD_COUNT'] = '1'
cls.env_variables['FUNCTIONS_WORKER_PROCESS_COUNT'] = '2'

os_environ = os.environ.copy()
os_environ.update(cls.env_variables)

cls._patch_environ = patch.dict('os.environ', os_environ)
cls._patch_environ.start()
os.environ.update(cls.env_variables)
super().setUpClass()

def tearDown(self):
super().tearDown()
self._patch_environ.stop()
@classmethod
def tearDownClass(cls):
# Remove the PYTHON_SCRIPT_FILE_NAME environment variable
os.environ.pop('PYTHON_THREADPOOL_THREAD_COUNT')
os.environ.pop('FUNCTIONS_WORKER_PROCESS_COUNT')
super().tearDownClass()

@classmethod
def get_script_dir(cls):
Expand Down
Loading