Skip to content

Bump black from 24.10.0 to 25.1.0 #293

Bump black from 24.10.0 to 25.1.0

Bump black from 24.10.0 to 25.1.0 #293

Workflow file for this run

name: CI
on:
push:
branches:
- master
pull_request:
jobs:
lint:
strategy:
fail-fast: false
matrix:
lint-command:
- bandit -r . -x ./tests
- black --check --diff .
- flake8 .
- isort --check-only --diff .
- pydocstyle .
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: "3.x"
cache: pip
cache-dependency-path: pyproject.toml
- run: python -m pip install .[lint]
- run: ${{ matrix.lint-command }}
dist:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: "3.x"
- name: Install Python dependencies
run: python -m pip install --upgrade pip build wheel twine readme-renderer
- run: python -m build --sdist --wheel
- run: python -m twine check dist/*
- uses: actions/upload-artifact@v4
with:
path: dist/*
docs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: "3.11"
- run: sudo apt install -y python3-enchant
- run: python -m pip install sphinxcontrib-spelling
- run: python -m pip install -e '.[docs]'
- run: python -m sphinx -W -b spelling docs docs/_build
SQLite:
needs: [ lint, dist, docs ]
runs-on: ubuntu-latest
strategy:
matrix:
python-version:
- "3.10"
- "3.11"
- "3.12"
django-version:
- "4.2"
- "5.0"
- "5.1"
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- run: python -m pip install -e '.[test]'
- run: python -m pip install Django~=${{ matrix.django-version }}.0
- run: python -m pytest
- uses: codecov/codecov-action@v5
with:
token: ${{ secrets.CODECOV_TOKEN }}
flags: python-${{ matrix.python-version }}
wagtail:
needs: [ lint, dist, docs ]
runs-on: ubuntu-latest
strategy:
matrix:
python-version: [ "3.x" ]
wagtail-version:
- "5.2.0"
- "6.0.0"
steps:
- uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- run: python -m pip install -e ".[test,wagtail]"
- run: python -m pip install wagtail~=${{ matrix.wagtail-version }}
- run: python -m pytest
- uses: codecov/codecov-action@v5
with:
token: ${{ secrets.CODECOV_TOKEN }}
flags: ${{ matrix.extras }}
PostgreSQL:
needs: [ lint, dist, docs ]
runs-on: ubuntu-latest
strategy:
matrix:
python-version: [ "3.x" ]
services:
postgres:
image: postgres
env:
POSTGRES_USER: django
POSTGRES_PASSWORD: django
ports:
- 5432/tcp
options: --health-cmd pg_isready --health-interval 10s --health-timeout 5s --health-retries 5
steps:
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- uses: actions/checkout@v4
- run: python -m pip install -e ".[test,postgres]"
- run: psql template1 -c "CREATE EXTENSION citext;"
env:
PGHOST: localhost
PGPORT: ${{ job.services.postgres.ports[5432] }}
PGUSER: django
PGPASSWORD: django
- run: python -m pytest
env:
DB_PORT: ${{ job.services.postgres.ports[5432] }}
DB: pg
- uses: codecov/codecov-action@v5
with:
token: ${{ secrets.CODECOV_TOKEN }}
flags: ${{ matrix.extras }}
analyze:
name: CodeQL
needs: [ SQLite, wagtail, PostgreSQL ]
runs-on: ubuntu-latest
permissions:
actions: read
contents: read
security-events: write
strategy:
fail-fast: false
matrix:
language: [ python ]
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Initialize CodeQL
uses: github/codeql-action/init@v3
with:
languages: ${{ matrix.language }}
queries: +security-and-quality
- name: Autobuild
uses: github/codeql-action/autobuild@v3
if: ${{ matrix.language == 'javascript' || matrix.language == 'python' }}
- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v3
with:
category: "/language:${{ matrix.language }}"