name: Tests on: pull_request: paths-ignore: ['docs/**', 'README.md', 'CHANGES.rst'] push: branches: [main, stable] paths-ignore: ['docs/**', 'README.md', 'CHANGES.rst'] permissions: {} concurrency: group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} cancel-in-progress: true jobs: tests: name: ${{ matrix.name || matrix.python }} runs-on: ${{ matrix.os || 'ubuntu-latest' }} strategy: fail-fast: false matrix: include: - {python: '3.15'} - {python: '3.14'} - {python: '3.13'} - {python: '3.12'} - {python: '3.11'} services: dynamodb: image: amazon/dynamodb-local:3.3.0 ports: - 8000:8000 # health checks options: >- --health-cmd "bash -c 'echo > /dev/tcp/localhost/8000'" --health-interval 10s --health-timeout 5s --health-retries 5 memcached: image: memcached:1.6.41 ports: - 11212:11211 # health checks options: >- --health-cmd "timeout 5 bash -c 'echo > /dev/tcp/127.0.0.1/11211'" --health-interval 10s --health-timeout 5s --health-retries 5 mongodb: image: mongo:8.3.1 ports: - 27017:27017 # health checks options: >- --health-cmd "mongosh --eval 'db.runCommand({ ping: 1 })'" --health-interval 10s --health-timeout 5s --health-retries 5 redis: image: redis:8.6.3 ports: - 6360:6379 # health checks options: >- --health-cmd "redis-cli ping" --health-interval 10s --health-timeout 5s --health-retries 5 valkey: image: valkey/valkey:9.0.4 ports: - 6370:6379 # health checks options: >- --health-cmd "valkey-cli ping" --health-interval 10s --health-timeout 5s --health-retries 5 steps: - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 with: persist-credentials: false - uses: astral-sh/setup-uv@20cfd1bf945f4377ade1205e4dbc17946fc9a30d # v10.0.1 with: enable-cache: true prune-cache: false - uses: actions/setup-python@5fda3b95a4ea91299a34e894583c3862153e4b97 # v7.0.0 with: python-version: ${{ matrix.python }} allow-prereleases: true - name: install external dependencies run: | sudo apt-get update sudo apt-get install libmemcached-dev - run: uv run --locked --no-default-groups --group dev tox run -e ${{ matrix.tox || format('py{0}', matrix.python) }} typing: runs-on: ubuntu-latest steps: - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 with: persist-credentials: false - uses: astral-sh/setup-uv@20cfd1bf945f4377ade1205e4dbc17946fc9a30d # v10.0.1 with: enable-cache: true prune-cache: false - uses: actions/setup-python@5fda3b95a4ea91299a34e894583c3862153e4b97 # v7.0.0 with: python-version-file: pyproject.toml - name: install external dependencies run: | sudo apt-get update sudo apt-get install libmemcached-dev - name: cache mypy uses: actions/cache@55cc8345863c7cc4c66a329aec7e433d2d1c52a9 # v6.1.0 with: path: ./.mypy_cache key: mypy|${{ hashFiles('pyproject.toml') }} - run: uv run --locked --no-default-groups --group dev tox run -e typing