OPT: Update all non-major dependencies ⬆️ #523
This file contains 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: Checks | |
on: | |
push: | |
branches: | |
- main | |
tags-ignore: | |
- '**' | |
pull_request: | |
branches: | |
- main | |
env: | |
ANSICON: 1 | |
FORCE_COLOR: 1 | |
jobs: | |
check: | |
name: Check | |
runs-on: ubuntu-latest | |
strategy: | |
fail-fast: false | |
matrix: | |
python-version: | |
- '3.9' | |
- '3.10' | |
- '3.11' | |
- '3.12' | |
- '3.13' | |
services: | |
redis: | |
image: redis | |
options: >- | |
--health-cmd "redis-cli ping" | |
--health-interval 5s | |
--health-timeout 1s | |
--health-retries 5 | |
ports: | |
- 6379:6379 | |
steps: | |
- name: "📥 Checkout" | |
uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- name: "✨ Install Poetry" | |
run: | | |
pipx install poetry | |
pipx inject poetry poetry-dynamic-versioning | |
- name: 🐍 Set up Python ${{ matrix.python-version }} | |
uses: actions/setup-python@v5 | |
with: | |
python-version: ${{ matrix.python-version }} | |
cache: poetry | |
- name: "🗃 Cache" | |
if: success() || failure() | |
uses: actions/cache@v4 | |
with: | |
path: | | |
.cache | |
.mypy_cache | |
.pytest_cache | |
.ruff_cache | |
key: ${{ runner.os }}-${{ matrix.python-version }}-check | |
- name: "📥 Install the package" | |
run: make install | |
- name: "🪄 Linter: Ruff" | |
if: success() || failure() | |
run: make lint/ruff | |
env: | |
RUFF_FORMAT: "github" | |
- name: "🪄 Linter: mypy" | |
if: success() || failure() | |
run: make lint/mypy | |
- name: "🧪 Tests" | |
if: success() || failure() | |
run: poetry run pytest tests --test-redis | |
env: | |
DJANGO_SETTINGS_MODULE: "tests.backends.django.settings" | |
- name: "📤 Codecov" | |
if: success() || failure() | |
uses: codecov/codecov-action@v4 | |
with: | |
token: ${{ secrets.CODECOV_TOKEN }} | |
env_vars: PYTHON | |
name: Python ${{ matrix.python-version }} | |
files: coverage.xml | |
fail_ci_if_error: false | |
- name: "📦 Build and publish package: dry run" | |
if: success() || failure() | |
run: poetry publish --build --dry-run --ansi |