Skip to content

docs: correct docstrings and guides that disagree with the code #167

docs: correct docstrings and guides that disagree with the code

docs: correct docstrings and guides that disagree with the code #167

Workflow file for this run

name: Test
on:
push:
branches: [ "master" ]
paths:
- '**.py'
- 'pyproject.toml'
- '.github/workflows/test.yml'
pull_request:
branches: [ "master" ]
paths:
- '**.py'
- 'pyproject.toml'
- '.github/workflows/test.yml'
jobs:
test:
runs-on: ubuntu-latest
services:
memcached:
image: memcached:1.6-alpine
ports:
- 11211:11211
redis:
image: redis:alpine
ports:
- 6379:6379
strategy:
matrix:
python-version: ["3.10", "3.11", "3.12", "3.13", "3.14"]
steps:
- uses: actions/checkout@v7
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v7
with:
python-version: ${{ matrix.python-version }}
- name: Install uv
uses: astral-sh/setup-uv@v10.2.0
- name: Sync dependencies
run: uv sync --extra jwt
- name: Run tests
run: uv run coverage run -m pytest && uv run coverage report
env:
# The suites that talk to a real server are opt-in: they wipe what they
# connect to, so they skip unless a port is named. These are the service
# containers above, which exist only for this job.
CACHEX_TEST_REDIS_PORT: 6379
CACHEX_TEST_MEMCACHED_PORT: 11211
# ...and here the services are this workflow's own responsibility, so a
# skipped suite is a broken job, not a safe default. Without this a
# wrong port silently drops those tests and the run is still green:
# coverage stays near 97%, well over the 90% gate.
CACHEX_REQUIRE_LIVE_SERVERS: 1