diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index 5656c43f2..ec4def4a1 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -39,26 +39,54 @@ 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"] + include: + - os: ubuntu-latest + python_version: "3.10" + tox_env: py310 + - os: ubuntu-latest + python_version: "3.11" + tox_env: py311 + - os: ubuntu-latest + python_version: "3.12" + tox_env: py312 + - os: ubuntu-latest + python_version: "3.13" + tox_env: py313 + - 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_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.tox_env }} - name: Upload test coverage uses: codecov/codecov-action@v6 diff --git a/tests/clients/test_dapr_grpc_client.py b/tests/clients/test_dapr_grpc_client.py index 211b66ab6..81f0b821d 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, TimeoutError)) 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..95e46e015 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, TimeoutError)) async def test_lock_acquire_success(self): dapr = DaprGrpcClientAsync(f'{self.scheme}localhost:{self.grpc_port}')