Skip to content

Commit 92d7663

Browse files
Run tests on multiple Python versions (#129)
* Run tests on multiple Python versions * Fix typing * Again
1 parent 748bfdf commit 92d7663

File tree

3 files changed

+16
-13
lines changed

3 files changed

+16
-13
lines changed

.github/workflows/test.yml

Lines changed: 13 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -28,24 +28,31 @@ jobs:
2828
echo " pre-commit run --all-files --hook-stage=manual"
2929
3030
test:
31-
name: Run tests on ${{ matrix.os }}
31+
name: Run tests on ${{ matrix.os }} python-${{ matrix.python-version }}
3232
runs-on: ${{ matrix.os }}
3333

3434
strategy:
3535
matrix:
3636
os: [ubuntu-latest, windows-latest, macos-latest]
37+
python-version:
38+
- '3.9'
39+
- '3.10'
40+
- '3.11'
41+
- '3.12'
42+
- '3.13'
43+
- 'pypy3.9'
44+
- 'pypy3.10'
45+
- 'pypy3.11'
3746
defaults:
3847
run:
3948
shell: bash -l {0}
4049
steps:
4150
- name: Checkout repository
4251
uses: actions/checkout@v4
43-
- name: Install mamba
44-
uses: mamba-org/setup-micromamba@v1
52+
- uses: actions/setup-node@v4
53+
- uses: actions/setup-python@v5
4554
with:
46-
environment-file: environment-dev.yml
47-
environment-name: pycrdt-websocket
48-
extra-specs: python=${{ matrix.python-version }}
55+
python-version: ${{ matrix.python-version }}
4956
- name: Ensure pip >= v25.1
5057
run: python -m pip install "pip >= 25.1"
5158
- name: Install dependencies

environment-dev.yml

Lines changed: 0 additions & 6 deletions
This file was deleted.

tests/utils.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
from __future__ import annotations
2+
13
from anyio import Lock, connect_tcp, create_memory_object_stream
24

35
from pycrdt import Array, Doc
@@ -62,7 +64,7 @@ async def recv(self) -> bytes:
6264

6365

6466
class ClientWebsocket:
65-
def __init__(self, server_websocket: "ServerWebsocket"):
67+
def __init__(self, server_websocket: ServerWebsocket):
6668
self.server_websocket = server_websocket
6769
self.send_stream, self.receive_stream = create_memory_object_stream[bytes](65536)
6870

0 commit comments

Comments
 (0)