From 0e55912fc0a2a819ddde18729111603c8787e486 Mon Sep 17 00:00:00 2001 From: xcrt Date: Mon, 26 Oct 2026 20:41:25 +0800 Subject: [PATCH 1/3] migrate test.yml workflow to uv --- .github/workflows/test.yml | 46 +++++++++++++++++--------------------- pyproject.toml | 10 +++++++++ 2 files changed, 30 insertions(+), 26 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 2f3c45d..d9cd01d 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -18,31 +18,25 @@ jobs: fail-fast: true matrix: - os: [ubuntu-latest, macos-latest] - pyv: ["3.9", "3.10", "3.11", "3.12", "3.13", "3.14"] + os: [ ubuntu-latest, macos-latest ] + pyv: [ "3.9", "3.10", "3.11", "3.12", "3.13", "3.14" ] steps: - - uses: actions/checkout@v6 - - - uses: actions/setup-python@v6 - with: - python-version: ${{ matrix.pyv }} - - - name: Install dependencies - run: | - python -m pip install -r requirements-dev.txt - python -m pip install -e . - - - name: Test - # Leave room for faulthandler_timeout (60s) to dump stacks and for - # asyncssh's login_timeout (120s) to raise before the step is killed. - timeout-minutes: 3 - run: >- - python -m pytest --cov-report=xml --cov=. - --reruns 1 --reruns-delay 2 - - - name: Upload coverage to Codecov - uses: codecov/codecov-action@v5 - with: - files: ./coverage.xml - fail_ci_if_error: false + - uses: actions/checkout@v6 + + - name: Install uv + uses: astral-sh/setup-uv@v10.3.2 + with: + python-version: ${{ matrix.pyv }} + + - name: Test + # Leave room for faulthandler_timeout (60s) to dump stacks and for + # asyncssh's login_timeout (120s) to raise before the step is killed. + timeout-minutes: 3 + run: uv run --group test pytest --cov-report=xml --cov=. --reruns 1 --reruns-delay 2 + + - name: Upload coverage to Codecov + uses: codecov/codecov-action@v5 + with: + files: ./coverage.xml + fail_ci_if_error: false diff --git a/pyproject.toml b/pyproject.toml index ceb88ca..6088728 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -26,6 +26,16 @@ dependencies = [ "asyncssh>=2.11.0,<3", ] +[dependency-groups] +test = [ + "pytest", + "pytest-asyncio", + "pytest-cov", + "pytest-rerunfailures", + "mock-ssh-server", + "importlib-metadata>=6.0.0", +] + [project.optional-dependencies] bcrypt = ["asyncssh[bcrypt]"] fido2 = ["asyncssh[fido2]"] From 4e5beb117423d217e37040bdd533db74f29a2400 Mon Sep 17 00:00:00 2001 From: xcRRRRt <479250392zxy@gmail.com> Date: Tue, 27 Oct 2026 10:47:50 +0800 Subject: [PATCH 2/3] ci: remove timeout explanation --- .github/workflows/test.yml | 2 -- 1 file changed, 2 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index d9cd01d..c295c9f 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -30,8 +30,6 @@ jobs: python-version: ${{ matrix.pyv }} - name: Test - # Leave room for faulthandler_timeout (60s) to dump stacks and for - # asyncssh's login_timeout (120s) to raise before the step is killed. timeout-minutes: 3 run: uv run --group test pytest --cov-report=xml --cov=. --reruns 1 --reruns-delay 2 From 17f0fed19fcda2fc13f4b69ca8c318e40139302a Mon Sep 17 00:00:00 2001 From: xcRRRRt <479250392zxy@gmail.com> Date: Tue, 27 Oct 2026 11:13:36 +0800 Subject: [PATCH 3/3] remove redundant requirements-dev.txt --- requirements-dev.txt | 6 ------ 1 file changed, 6 deletions(-) delete mode 100644 requirements-dev.txt diff --git a/requirements-dev.txt b/requirements-dev.txt deleted file mode 100644 index 2433630..0000000 --- a/requirements-dev.txt +++ /dev/null @@ -1,6 +0,0 @@ -pytest -pytest-asyncio -pytest-cov -pytest-rerunfailures -mock-ssh-server -importlib-metadata >= 6.0.0