mirror of
https://github.com/python-kasa/python-kasa.git
synced 2026-11-07 12:27:19 +00:00
Some checks are pending
CI / Perform Lint Checks (3.15) (push) Waiting to run
CI / Python 3.11 on macos-latest (push) Blocked by required conditions
CI / Python 3.12 on macos-latest (push) Blocked by required conditions
CI / Python 3.13 on macos-latest (push) Blocked by required conditions
CI / Python 3.14 on macos-latest (push) Blocked by required conditions
CI / Python 3.15 on macos-latest (push) Blocked by required conditions
CI / Python 3.11 on ubuntu-latest (push) Blocked by required conditions
CI / Python 3.12 on ubuntu-latest (push) Blocked by required conditions
CI / Python 3.13 on ubuntu-latest (push) Blocked by required conditions
CI / Python 3.14 on ubuntu-latest (push) Blocked by required conditions
CI / Python 3.15 on ubuntu-latest (push) Blocked by required conditions
CI / Python 3.11 on windows-latest (push) Blocked by required conditions
CI / Python 3.12 on windows-latest (push) Blocked by required conditions
CI / Python 3.13 on windows-latest (push) Blocked by required conditions
CI / Python 3.14 on windows-latest (push) Blocked by required conditions
CI / Python 3.15 on windows-latest (push) Blocked by required conditions
CodeQL Checks / Analyze (python) (push) Waiting to run
Windows has no native socketpair, so the self-pipe of every asyncio event loop is a loopback TCP connection, and closing it leaves a port in TIME_WAIT for two minutes. With a new event loop for each test, a run that gets through about 16,000 tests within two minutes uses up the dynamic port range, and the Windows test jobs hang until the 6-hour job limit. This PR runs the tests on one event loop per session, so a full run opens about 100 socket pairs instead of about 26,000, and runs the Windows jobs with xdist again. In details: - `asyncio_default_fixture_loop_scope` and `asyncio_default_test_loop_scope` are `session`. - CI: Windows runs `pytest -n auto` like the other OSes, and the test jobs get a 30-minute limit. Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
91 lines
2.5 KiB
YAML
91 lines
2.5 KiB
YAML
---
|
|
name: CI
|
|
|
|
on:
|
|
push:
|
|
branches:
|
|
- master
|
|
- patch
|
|
pull_request:
|
|
branches:
|
|
- master
|
|
- patch
|
|
- 'feat/**'
|
|
- 'fix/**'
|
|
- 'janitor/**'
|
|
workflow_dispatch:
|
|
|
|
concurrency:
|
|
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
|
|
cancel-in-progress: true
|
|
|
|
jobs:
|
|
lint:
|
|
name: Perform Lint Checks
|
|
runs-on: ubuntu-latest
|
|
strategy:
|
|
matrix:
|
|
python-version: [3.15]
|
|
steps:
|
|
- name: Checkout Source Files
|
|
id: checkout
|
|
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
|
|
|
- name: Setup Environment
|
|
id: setup-environment
|
|
uses: ./.github/actions/setup
|
|
with:
|
|
python-version: ${{ matrix.python-version }}
|
|
cache-pre-commit: true
|
|
uv-install-options: --all-extras
|
|
|
|
- name: Run pre-commit Checks
|
|
id: run-pre-commit
|
|
shell: bash
|
|
run: |
|
|
uv run pre-commit run --all-files --verbose
|
|
|
|
# Build the same way as publish.yml to catch packaging issues before a release is tagged.
|
|
- name: Build and Check Packages
|
|
id: build-packages
|
|
uses: ./.github/actions/build-packages
|
|
|
|
tests:
|
|
name: Python ${{ matrix.python-version}} on ${{ matrix.os }}${{ fromJSON('[" (extras)", ""]')[matrix.extras == ''] }}
|
|
needs: lint
|
|
runs-on: ${{ matrix.os }}
|
|
timeout-minutes: 30
|
|
strategy:
|
|
matrix:
|
|
python-version: [3.11, 3.12, 3.13, 3.14, 3.15]
|
|
os: [ubuntu-latest, macos-latest, windows-latest]
|
|
extras: [false, true]
|
|
exclude:
|
|
- os: macos-latest
|
|
extras: true
|
|
- os: windows-latest
|
|
extras: true
|
|
steps:
|
|
- name: Checkout Source Files
|
|
id: checkout
|
|
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
|
|
|
- name: Setup Environment
|
|
id: setup-environment
|
|
uses: ./.github/actions/setup
|
|
with:
|
|
python-version: ${{ matrix.python-version }}
|
|
uv-install-options: ${{ matrix.extras == true && '--all-extras' || '' }}
|
|
|
|
- name: Run PyTests with Code Coverage
|
|
id: run-pytests-with-code-coverage
|
|
shell: bash
|
|
run: |
|
|
uv run pytest -n auto --cov kasa --cov-report xml
|
|
|
|
- name: Upload Code Coverage to Codecov
|
|
id: upload-code-coverage-to-codecov
|
|
uses: codecov/codecov-action@303a32d7a59b442fa8d48b6a1cc6825c09c847a5 # v7.1.1
|
|
with:
|
|
token: ${{ secrets.CODECOV_TOKEN }}
|