Skip to content

fix(client): concurrent first init_client calls share one attempt #1425

fix(client): concurrent first init_client calls share one attempt

fix(client): concurrent first init_client calls share one attempt #1425

Workflow file for this run

name: CI
on:
push:
branches: [main]
pull_request:
permissions:
contents: read
jobs:
# ─── Lint & format ──────────────────────────────────────────────────────────
lint:
name: Lint & format
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: astral-sh/setup-uv@v5
with:
python-version: "3.12"
- run: uv lock
- run: uv sync --all-packages
- run: uv run ruff check .
- run: uv run ruff format --check .
# ─── Setup ──────────────────────────────────────────────────────────────────
setup:
name: Install & sync
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: astral-sh/setup-uv@v5
with:
python-version: "3.12"
- run: uv lock
- run: uv sync --all-packages
# ─── Type check ─────────────────────────────────────────────────────────────
typecheck:
name: Type check
needs: setup
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: astral-sh/setup-uv@v5
with:
python-version: "3.12"
- run: uv lock
- run: uv sync --all-packages
# Not bare `mypy .`: the per-package `tests/conftest.py` files collide under mypy's module
# resolution, which aborts the run before anything is checked. `make typecheck` runs this
# same command.
- run: uv run mypy packages/*/src
# ─── Test ───────────────────────────────────────────────────────────────────
test:
name: Tests
needs: setup
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: astral-sh/setup-uv@v5
with:
python-version: "3.12"
- run: uv lock
- run: uv sync --all-packages
# Not `packages/*/tests`: that glob silently skips the repo-root `tests/` directory, which
# holds the invariants no single package can own. `make test` runs this same bare command.
- run: uv run pytest
# ─── Build ────────────────────────────────────────────────────────────────
build:
name: Build all packages
needs: [lint, typecheck, test]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: astral-sh/setup-uv@v5
with:
python-version: "3.12"
- run: uv lock
- run: uv sync --all-packages
- name: Build all packages
run: |
for pkg in packages/*/; do
echo "Building $pkg..."
(cd "$pkg" && uv build --out-dir dist)
done
# ─── Packaging ──────────────────────────────────────────────────────────────
# Installs each wheel into an empty virtualenv with its documented install
# command, then imports its public modules and every module its source
# imports, lazy ones included. The workspace test run cannot catch an
# undeclared dependency, because it installs every package's at once.
packaging:
name: Packaging check
needs: [lint, typecheck, test]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: astral-sh/setup-uv@v5
with:
python-version: "3.12"
- run: uv lock
- run: uv sync --all-packages
- run: make check-packaging