From 82b988e0fe97e0bea578e7e152a4ecf4523dd098 Mon Sep 17 00:00:00 2001 From: pdthummar <101662222+pdthummar@users.noreply.github.com> Date: Tue, 3 Oct 2023 13:03:07 -0500 Subject: [PATCH] Add py3.11 tests for CI consumption workflow. (#1266) Co-authored-by: Varad Meru Co-authored-by: gavin-aguiar <80794152+gavin-aguiar@users.noreply.github.com> --- .github/workflows/ci_consumption_workflow.yml | 7 ++++++- tests/consumption_tests/test_linux_consumption.py | 4 ++-- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/.github/workflows/ci_consumption_workflow.yml b/.github/workflows/ci_consumption_workflow.yml index aff1c3d2..4dbc1e36 100644 --- a/.github/workflows/ci_consumption_workflow.yml +++ b/.github/workflows/ci_consumption_workflow.yml @@ -17,7 +17,7 @@ jobs: strategy: fail-fast: false matrix: - python-version: [ 3.7, 3.8, 3.9, "3.10" ] + python-version: [ 3.7, 3.8, 3.9, "3.10", "3.11" ] steps: - name: Checkout code. @@ -51,3 +51,8 @@ jobs: env: AzureWebJobsStorage: ${{ secrets.LinuxStorageConnectionString310 }} run: python -m pytest -n auto --dist loadfile -vv --reruns 4 --instafail tests/consumption_tests + - name: Running 3.11 Tests + if: matrix.python-version == 3.11 + env: + AzureWebJobsStorage: ${{ secrets.LinuxStorageConnectionString311 }} + run: python -m pytest -n auto --dist loadfile -vv --reruns 4 --instafail tests/consumption_tests diff --git a/tests/consumption_tests/test_linux_consumption.py b/tests/consumption_tests/test_linux_consumption.py index 92589c7b..99280119 100644 --- a/tests/consumption_tests/test_linux_consumption.py +++ b/tests/consumption_tests/test_linux_consumption.py @@ -90,7 +90,7 @@ class TestLinuxConsumption(TestCase): self.assertIn('pyodbc', content) self.assertIn('requests', content) - @skipIf(sys.version_info.minor == 10, + @skipIf(sys.version_info.minor in (10, 11), "Protobuf pinning fails during remote build") def test_new_protobuf(self): """A function app with the following requirements.txt: @@ -120,7 +120,7 @@ class TestLinuxConsumption(TestCase): self.assertEqual(content['google.protobuf'], '3.15.8') self.assertEqual(content['grpc'], '1.33.2') - @skipIf(sys.version_info.minor == 10, + @skipIf(sys.version_info.minor in (10, 11), "Protobuf pinning fails during remote build") def test_old_protobuf(self): """A function app with the following requirements.txt: