From 0d07a99eddde18eada90f324e952b4d20af2fc62 Mon Sep 17 00:00:00 2001 From: cyphercodes Date: Wed, 29 Apr 2026 21:21:30 +0300 Subject: [PATCH 1/3] Add cross-platform CI test matrix Signed-off-by: cyphercodes --- .github/workflows/build.yaml | 22 +++++++++++++++++----- 1 file changed, 17 insertions(+), 5 deletions(-) diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index 5656c43f2..8b2d95922 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -39,26 +39,38 @@ jobs: build: needs: lint - runs-on: ubuntu-latest + runs-on: ${{ matrix.os }} strategy: fail-fast: false matrix: - python_ver: ["3.10", "3.11", "3.12", "3.13", "3.14"] + os: [ubuntu-latest, windows-latest, macos-latest] + python: + - version: "3.10" + tox_env: py310 + - version: "3.11" + tox_env: py311 + - version: "3.12" + tox_env: py312 + - version: "3.13" + tox_env: py313 + - version: "3.14" + tox_env: py314 steps: - uses: actions/checkout@v6 - - name: Set up Python ${{ matrix.python_ver }} + - name: Set up Python ${{ matrix.python.version }} uses: actions/setup-python@v6 with: - python-version: ${{ matrix.python_ver }} + python-version: ${{ matrix.python.version }} - name: Install dependencies run: | python -m pip install --upgrade pip pip install setuptools wheel tox - name: Check Typing + if: matrix.os == 'ubuntu-latest' run: | tox -e type - name: Run unit-tests run: | - tox -e py`echo "${{ matrix.python_ver }}" | sed 's/\.//g'` + tox -e ${{ matrix.python.tox_env }} - name: Upload test coverage uses: codecov/codecov-action@v6 From 5468bed00af76da9be46b7f59f13167c35d19c33 Mon Sep 17 00:00:00 2001 From: cyphercodes Date: Thu, 30 Apr 2026 12:58:10 +0300 Subject: [PATCH 2/3] Update cross-platform test matrix Signed-off-by: cyphercodes --- .github/workflows/build.yaml | 36 ++++++++++++++++++++++++++---------- 1 file changed, 26 insertions(+), 10 deletions(-) diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index 8b2d95922..ec4def4a1 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -43,24 +43,40 @@ jobs: strategy: fail-fast: false matrix: - os: [ubuntu-latest, windows-latest, macos-latest] - python: - - version: "3.10" + include: + - os: ubuntu-latest + python_version: "3.10" tox_env: py310 - - version: "3.11" + - os: ubuntu-latest + python_version: "3.11" tox_env: py311 - - version: "3.12" + - os: ubuntu-latest + python_version: "3.12" tox_env: py312 - - version: "3.13" + - os: ubuntu-latest + python_version: "3.13" tox_env: py313 - - version: "3.14" + - os: ubuntu-latest + python_version: "3.14" tox_env: py314 + - os: windows-latest + python_version: "3.10" + tox_env: py310 + - os: windows-latest + python_version: "3.13" + tox_env: py313 + - os: macos-latest + python_version: "3.10" + tox_env: py310 + - os: macos-latest + python_version: "3.13" + tox_env: py313 steps: - uses: actions/checkout@v6 - - name: Set up Python ${{ matrix.python.version }} + - name: Set up Python ${{ matrix.python_version }} uses: actions/setup-python@v6 with: - python-version: ${{ matrix.python.version }} + python-version: ${{ matrix.python_version }} - name: Install dependencies run: | python -m pip install --upgrade pip @@ -71,6 +87,6 @@ jobs: tox -e type - name: Run unit-tests run: | - tox -e ${{ matrix.python.tox_env }} + tox -e ${{ matrix.tox_env }} - name: Upload test coverage uses: codecov/codecov-action@v6 From 2d13963639cd8fe729e42477b4bbabd287ad4a56 Mon Sep 17 00:00:00 2001 From: cyphercodes Date: Thu, 30 Apr 2026 17:17:30 +0300 Subject: [PATCH 3/3] test: make wait timeout assertions cross-platform Signed-off-by: cyphercodes --- tests/clients/test_dapr_grpc_client.py | 2 +- tests/clients/test_dapr_grpc_client_async.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/clients/test_dapr_grpc_client.py b/tests/clients/test_dapr_grpc_client.py index 211b66ab6..b3bcf5a3a 100644 --- a/tests/clients/test_dapr_grpc_client.py +++ b/tests/clients/test_dapr_grpc_client.py @@ -815,7 +815,7 @@ def test_wait_timeout(self): dapr = DaprGrpcClient(f'localhost:{port}') with self.assertRaises(Exception) as context: dapr.wait(0.1) - self.assertTrue('Connection refused' in str(context.exception)) + self.assertIsInstance(context.exception, ConnectionRefusedError) def test_lock_acquire_success(self): dapr = DaprGrpcClient(f'{self.scheme}localhost:{self.grpc_port}') diff --git a/tests/clients/test_dapr_grpc_client_async.py b/tests/clients/test_dapr_grpc_client_async.py index e27b8dc52..5a62e6994 100644 --- a/tests/clients/test_dapr_grpc_client_async.py +++ b/tests/clients/test_dapr_grpc_client_async.py @@ -799,7 +799,7 @@ async def test_wait_timeout(self): dapr = DaprGrpcClientAsync(f'{self.scheme}localhost:{port}') with self.assertRaises(Exception) as context: await dapr.wait(0.1) - self.assertTrue('Connection refused' in str(context.exception)) + self.assertIsInstance(context.exception, ConnectionRefusedError) async def test_lock_acquire_success(self): dapr = DaprGrpcClientAsync(f'{self.scheme}localhost:{self.grpc_port}')