diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 52e2d03..a0fd50f 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -14,14 +14,17 @@ jobs: matrix: # If changing how many times tests are run, must also change in codecov.yml # to ensure test coverage is reported only after all tests have finished - python-version: ["3.9", "3.10", "3.11", "3.12", "3.13"] + python-version: ["3.9", "3.10", "3.11", "3.12", "3.13", "3.14"] steps: - name: "Checkout" uses: "actions/checkout@v3" - - uses: "actions/setup-python@v5" + - name: Install uv and set the python version + uses: astral-sh/setup-uv@v6 with: + version: "0.6.17" python-version: '${{ matrix.python-version }}' + activate-environment: true - name: "Install bsdcpio" run: | ./install-libarachive.sh @@ -41,8 +44,8 @@ jobs: pip install ".[dev,ci]" - name: "Run type checking" run: | - mypy stream_zip --strict + uv run mypy stream_zip --strict - name: "Run tests" run: | - pytest --cov + uv run pytest --cov - uses: codecov/codecov-action@v3 diff --git a/codecov.yml b/codecov.yml index fde6947..755dff1 100644 --- a/codecov.yml +++ b/codecov.yml @@ -1,4 +1,4 @@ comment: false codecov: notify: - after_n_builds: 5 + after_n_builds: 6 diff --git a/test_stream_zip.py b/test_stream_zip.py index 5199bc4..7aee3ee 100644 --- a/test_stream_zip.py +++ b/test_stream_zip.py @@ -1386,7 +1386,7 @@ async def async_concat(chunks): async def test(): assert b''.join(stream_zip(sync_files())) == await async_concat(async_stream_zip(async_files())) - asyncio.get_event_loop().run_until_complete(test()) + asyncio.run(test()) def test_async_exception_propagates(): @@ -1405,7 +1405,7 @@ async def test(): pass with pytest.raises(Exception, match='From generator'): - asyncio.get_event_loop().run_until_complete(test()) + asyncio.run(test()) def test_async_exception_from_bytes_propagates(): @@ -1424,7 +1424,7 @@ async def test(): pass with pytest.raises(Exception, match='From generator'): - asyncio.get_event_loop().run_until_complete(test()) + asyncio.run(test()) def test_async_stream_zip_does_stream(): @@ -1446,7 +1446,7 @@ async def test(): async for chunk in async_stream_zip(async_files()): state.append('out') - asyncio.get_event_loop().run_until_complete(test()) + asyncio.run(test()) assert state == ['out', 'in', 'in', 'out', 'in', 'out', 'in', 'out', 'out'] @@ -1491,7 +1491,7 @@ async def test(): async for chunk in async_stream_zip(async_files()): pass - asyncio.get_event_loop().run_until_complete(test()) + asyncio.run(test()) assert var.get() == 'set-from-outer' assert inner_files == 'set-from-outer'