ci: run the unit suite in parallel and keep it off the network

Test servers shut down without the 0.5s poll wait, unit tests refuse non-loopback lookups, and three load-sensitive tests are steadied. Pushes to dev test Python 3.11 only; the docs job builds with uv.
This commit is contained in:
imSp4rky
2026-10-13 19:31:23 -06:00
parent 6b04d7b137
commit 9f82777394
13 changed files with 117 additions and 39 deletions
+6 -5
View File
@@ -41,8 +41,11 @@ jobs:
fail-fast: false
matrix:
os: [ubuntu-latest, windows-latest, macos-latest]
python-version: ["3.11", "3.14"]
python-version: ${{ fromJSON(github.event_name == 'push' && github.ref == 'refs/heads/dev' && '["3.11"]' || '["3.11", "3.14"]') }}
runs-on: ${{ matrix.os }}
timeout-minutes: 15
env:
UV_NO_SYNC: "1"
steps:
- uses: actions/checkout@v7
- uses: astral-sh/setup-uv@v8.3.2
@@ -50,13 +53,11 @@ jobs:
python-version: ${{ matrix.python-version }}
enable-cache: true
- name: Install
run: uv sync --locked --group test
- name: Import check
run: uv run python -c "import unshackle; print(unshackle.__name__, 'imports OK')"
run: uv sync --locked --no-default-groups --group test
- name: CLI loads
run: uv run unshackle --help
- name: Tests
run: uv run pytest -m "not live and not slow"
run: uv run pytest -n auto --dist worksteal -m "not live and not slow"
build:
runs-on: ubuntu-latest
+10 -8
View File
@@ -29,11 +29,12 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v7
- uses: actions/setup-python@v6
- uses: astral-sh/setup-uv@v8.3.2
with:
python-version: "3.x"
- run: pip install -e . -r docs/requirements-docs.txt
- run: mkdocs build --strict
python-version: "3.14"
enable-cache: true
cache-suffix: docs
- run: uv run --no-project --with-requirements docs/requirements-docs.txt mkdocs build --strict
deploy:
if: github.event_name != 'pull_request'
@@ -42,8 +43,9 @@ jobs:
- uses: actions/checkout@v7
with:
fetch-depth: 0
- uses: actions/setup-python@v6
- uses: astral-sh/setup-uv@v8.3.2
with:
python-version: "3.x"
- run: pip install -e . -r docs/requirements-docs.txt
- run: mkdocs gh-deploy --remote-branch docs
python-version: "3.14"
enable-cache: true
cache-suffix: docs
- run: uv run --no-project --with-requirements docs/requirements-docs.txt mkdocs gh-deploy --remote-branch docs