feat: add sorted set operations and mixins for RedisCache #957
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: CI | |
| on: [push, pull_request] | |
| jobs: | |
| test: | |
| name: > | |
| Test Python ${{ matrix.python-version }}, | |
| Django ${{ matrix.django-version }}, | |
| Redis.py ${{ matrix.redis-version }} | |
| runs-on: ubuntu-latest | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| python-version: | |
| - '3.10' | |
| - '3.11' | |
| - '3.12' | |
| django-version: | |
| - '4.2' | |
| - '5.1' | |
| - '5.2' | |
| redis-version: | |
| - 'latest' | |
| # Only test pre-release dependencies for the latest Python. | |
| include: | |
| # Django 4.2 and python 3.9 with latest redis | |
| - django-version: '4.2' | |
| redis-version: 'latest' | |
| python-version: '3.9' | |
| # latest Django with latest redis | |
| - django-version: '5.2' | |
| redis-version: 'latest' | |
| python-version: '3.13' | |
| # latest Django with pre-release redis | |
| - django-version: '5.2' | |
| redis-version: 'master' | |
| python-version: '3.13' | |
| # pre-release Django with latest redis | |
| - django-version: 'main' | |
| redis-version: 'latest' | |
| python-version: '3.13' | |
| # pre-release Django and pre-release redis | |
| - django-version: 'main' | |
| redis-version: 'master' | |
| python-version: '3.13' | |
| steps: | |
| - uses: actions/checkout@v5 | |
| - name: Set up Python ${{ matrix.python-version }} | |
| uses: actions/setup-python@v6 | |
| with: | |
| python-version: ${{ matrix.python-version }} | |
| - name: Get pip cache dir | |
| id: pip-cache | |
| run: | | |
| echo "::set-output name=dir::$(pip cache dir)" | |
| - name: Cache | |
| uses: actions/cache@v4 | |
| with: | |
| path: ${{ steps.pip-cache.outputs.dir }} | |
| key: pip-test-python-${{ matrix.python-version }}-django-${{ matrix.django-version }}-redis-${{ matrix.redis-version }}-${{ hashFiles('**/setup.*') }} | |
| restore-keys: | | |
| pip-test-python-${{ matrix.python-version }}-django-${{ matrix.django-version }}-redis-${{ matrix.redis-version }} | |
| pip-test-python-${{ matrix.python-version }} | |
| pip-test- | |
| - name: Install dependencies | |
| run: | | |
| python -m pip install --upgrade pip | |
| python -m pip install --upgrade tox-uv tox-gh-actions | |
| - name: Docker compose up | |
| run: docker compose -f docker/docker-compose.yml up -d --wait | |
| - name: Tox tests | |
| run: tox | |
| env: | |
| DJANGO: ${{ matrix.django-version }} | |
| REDIS: ${{ matrix.redis-version }} | |
| - name: Upload coverage | |
| uses: codecov/codecov-action@v5 | |
| with: | |
| env_vars: DJANGO,REDIS,PYTHON | |
| flags: tests | |
| env: | |
| DJANGO: ${{ matrix.django-version }} | |
| REDIS: ${{ matrix.redis-version }} | |
| PYTHON: ${{ matrix.python-version }} | |
| lint: | |
| name: Lint (${{ matrix.tool }}) | |
| runs-on: ubuntu-latest | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| tool: | |
| - 'pre-commit' | |
| - 'mypy' | |
| steps: | |
| - uses: actions/checkout@v5 | |
| - name: Set up Python | |
| uses: actions/setup-python@v6 | |
| with: | |
| python-version: '3.x' | |
| - name: Get pip cache dir | |
| id: pip-cache | |
| run: | | |
| echo "::set-output name=dir::$(pip cache dir)" | |
| - name: Cache | |
| uses: actions/cache@v4 | |
| with: | |
| path: ${{ steps.pip-cache.outputs.dir }} | |
| key: pip-lint-${{ hashFiles('**/setup.*') }} | |
| restore-keys: | | |
| pip-lint- | |
| - name: Install dependencies | |
| run: | | |
| python -m pip install --upgrade pip | |
| python -m pip install --upgrade "tox<4" | |
| - name: Run ${{ matrix.tool }} | |
| run: tox -e ${{ matrix.tool }} | |
| - name: Upload coverage | |
| if: ${{ matrix.tool == 'mypy' }} | |
| uses: codecov/codecov-action@v5 | |
| with: | |
| flags: mypy | |
| check-changelog: | |
| name: Check for news fragments in 'changelog.d/' | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v5 | |
| with: | |
| fetch-depth: 0 | |
| - name: Set up Python | |
| uses: actions/setup-python@v6 | |
| with: | |
| python-version: '3.x' | |
| - name: Get pip cache dir | |
| id: pip-cache | |
| run: | | |
| echo "::set-output name=dir::$(pip cache dir)" | |
| - name: Cache | |
| uses: actions/cache@v4 | |
| with: | |
| path: ${{ steps.pip-cache.outputs.dir }} | |
| key: pip-check-changelog-${{ hashFiles('**/setup.*') }} | |
| restore-keys: | | |
| pip-check-changelog- | |
| - name: Install dependencies | |
| run: | | |
| python -m pip install --upgrade towncrier | |
| - name: Run towncrier check | |
| run: | | |
| if ! towncrier check; then | |
| echo '' | |
| echo "Please add a description of your changes to 'changelog.d/{issue or PR number}.{feature,bugfix,misc,doc,removal}'" | |
| exit 1 | |
| fi |