Bump black from 24.3.0 to 24.4.0 #265
Workflow file for this run
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: 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.9" | |
- "3.10" | |
- "3.11" | |
django-version: | |
- "4.0" | |
- "4.1" | |
- "4.2" | |
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 pytest | |
- uses: codecov/codecov-action@v4 | |
with: | |
flags: ${{ matrix.python-version }} | |
contrib: | |
needs: [ lint, dist, docs ] | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
extras: | |
- wagtail | |
python-version: [ "3.x" ] | |
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,${{ matrix.extras }}]" | |
- run: python -m pytest | |
- uses: codecov/codecov-action@v4 | |
with: | |
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: python -m pytest | |
env: | |
DB_PORT: ${{ job.services.postgres.ports[5432] }} | |
DB: pg | |
- uses: codecov/codecov-action@v4 | |
with: | |
flags: ${{ matrix.extras }} | |
analyze: | |
name: CodeQL | |
needs: [ SQLite, contrib, 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 }}" |