version: 2.1 orbs: codecov: codecov/codecov@6.0.0 executors: # Pin the uv version: the unversioned bookworm tags stopped updating in # early 2026 and ship a uv too old to know about current 3.15 builds. cpython_executor: docker: - image: "ghcr.io/astral-sh/uv:0.12.10-python3.12-trixie" resource_class: small environment: FORCE_COLOR: "1" uv_executor: docker: - image: "ghcr.io/astral-sh/uv:0.12.10-trixie" resource_class: small environment: FORCE_COLOR: "1" pypy_executor: docker: - image: "pypy:3.11-bookworm" auth: username: $DOCKERHUB_USERNAME password: $DOCKERHUB_PASSWORD resource_class: small environment: FORCE_COLOR: "1" PIP_ROOT_USER_ACTION: "ignore" jobs: build: executor: name: cpython_executor steps: - checkout - run: uv build - persist_to_workspace: root: dist paths: - aiosmtplib-*.tar.gz - aiosmtplib-*.whl - store_artifacts: path: dist/ buildcheck: executor: name: cpython_executor steps: - checkout - attach_workspace: at: dist - run: uv tool run --from poethepoet poe buildcheck typecheck: executor: name: cpython_executor steps: - checkout - run: uv tool run --from poethepoet poe typecheck security: executor: name: cpython_executor steps: - checkout - run: uv tool run --from poethepoet poe security docs: executor: name: cpython_executor steps: - checkout - attach_workspace: at: dist - run: uv venv - run: uv pip install -r docs/requirements.txt - run: uv pip install -r requirements-dev.txt - run: uv pip install dist/*.whl - run: uv run python -m sphinx -nWT -b doctest -d ./docs/build/doctrees ./docs ./docs/build/html - run: uv run python -m sphinx -nWT -b dummy -d ./docs/build/doctrees ./docs ./docs/build/html test: executor: name: uv_executor parameters: python_version: type: enum description: "uv python version request (t suffix = free-threaded)" enum: ["3.10", "3.11", "3.12", "3.13", "3.14", "3.15", "3.14t", "3.15t"] event_loop: type: enum description: "event loop type" enum: ["asyncio", "uvloop"] environment: COVERAGE_FILE: "coverage-results/.coverage.cpython<>-<>" HYPOTHESIS_PROFILE: "ci" BIND_ADDR: "127.0.0.1" steps: - checkout - attach_workspace: at: dist - run: uv python install <> - run: uv venv --python=<> - run: uv run --no-project -- python -VV - run: uv pip install -r requirements-dev.txt - when: condition: equal: ["uvloop", <>] steps: - run: uv pip install $(find dist -name aiosmtplib-*.whl)[uvloop] - unless: condition: equal: ["uvloop", <>] steps: - run: uv pip install $(find dist -name aiosmtplib-*.whl) - run: | uv run --no-project -- python -m pytest \ --cov \ --cov-report=xml:coverage-results/coverage-cpython<>-<>.xml \ --cov-config=pyproject.toml \ --junitxml=test-results/junit-cpython<>-<>.xml \ --override-ini=pythonpath= \ --event-loop=<> \ --bind-addr=$BIND_ADDR \ --hypothesis-profile $HYPOTHESIS_PROFILE - store_artifacts: path: test-results - store_test_results: path: test-results - persist_to_workspace: root: coverage-results paths: - .coverage.* - codecov/upload: report_type: test_results disable_search: true files: "test-results/junit-cpython<>-<>.xml" flags: "cpython<>,<>" - codecov/upload: report_type: coverage disable_search: true files: "coverage-results/coverage-cpython<>-<>.xml" flags: "cpython<>,<>" test-pypy: executor: name: pypy_executor environment: COVERAGE_FILE: "coverage-results/.coverage.pypy3.11-asyncio" HYPOTHESIS_PROFILE: "ci" BIND_ADDR: "127.0.0.1" steps: - checkout - attach_workspace: at: dist - run: python -m pip install -r requirements-dev.txt - run: python -m pip install dist/*.whl - run: | python -m pytest --cov \ --cov-report=xml:coverage-results/coverage-pypy3.11-asyncio.xml \ --cov-config=pyproject.toml \ --junitxml=test-results/junit-pypy3.11-asyncio.xml \ --override-ini=pythonpath= \ --event-loop=asyncio \ --bind-addr=$BIND_ADDR \ --hypothesis-profile $HYPOTHESIS_PROFILE - store_artifacts: path: test-results - store_test_results: path: test-results - persist_to_workspace: root: coverage-results paths: - .coverage.* - codecov/upload: report_type: test_results disable_search: true files: "test-results/junit-pypy3.11-asyncio.xml" flags: "pypy3.11,asyncio" - codecov/upload: report_type: coverage disable_search: true files: "coverage-results/coverage-pypy3.11-asyncio.xml" flags: "pypy3.11,asyncio" coverage: executor: name: cpython_executor environment: COVERAGE_FILE: .coverage steps: - checkout - attach_workspace: at: coverage-results - run: cp coverage-results/.coverage.* ./ - run: uv tool run coverage combine - run: uv tool run coverage xml - run: uv tool run coverage html - store_artifacts: path: coverage.xml - store_artifacts: path: htmlcov - run: uv tool run coverage report --fail-under=100 workflows: build_test: jobs: - build: &base-job context: - docker-hub-credentials filters: tags: only: /.*/ - buildcheck: <<: *base-job requires: - build - docs: <<: *base-job requires: - build - test-pypy: <<: *base-job name: "test-asyncio-pypy3.11" requires: - build - test: <<: *base-job name: "test-asyncio-<< matrix.python_version >>" matrix: alias: "test-cpython-asyncio" parameters: event_loop: ["asyncio"] # uvloop has no wheels for 3.15 or free-threaded builds, so # those run asyncio only. 3.13t is skipped because cffi (via # trustme) does not support it. python_version: ["3.10", "3.11", "3.12", "3.13", "3.14", "3.15", "3.14t", "3.15t"] requires: - build - test: <<: *base-job name: "test-uvloop-<< matrix.python_version >>" matrix: alias: "test-cpython-uvloop" parameters: event_loop: ["uvloop"] python_version: ["3.10", "3.11", "3.12", "3.13", "3.14"] requires: - build - "test-asyncio-<< matrix.python_version >>" - coverage: <<: *base-job requires: - test-cpython-asyncio - test-cpython-uvloop - test-asyncio-pypy3.11 lint: jobs: - typecheck: <<: *base-job - security: <<: *base-job # VS Code Extension Version: 1.5.1