diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 2f3c45d..c295c9f 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -18,31 +18,23 @@ 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 + 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]"] 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