Skip to content

Commit

Permalink
Merge branch 'master' into GITHUB-24538627-Add-bulk-delete-to-version…
Browse files Browse the repository at this point in the history
…s-djangocms-versioning
  • Loading branch information
fsbraun authored Oct 29, 2024
2 parents 826d248 + 76a7cc4 commit 1ec0318
Show file tree
Hide file tree
Showing 83 changed files with 2,800 additions and 940 deletions.
11 changes: 11 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# To get started with Dependabot version updates, you'll need to specify which
# package ecosystems to update and where the package manifests are located.
# Please see the documentation for all configuration options:
# https://docs.github.com/github/administering-a-repository/configuration-options-for-dependency-updates

version: 2
updates:
- package-ecosystem: "github-actions"
directory: "/" # Location of package manifests
schedule:
interval: "weekly"
8 changes: 4 additions & 4 deletions .github/workflows/codeql.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,19 +24,19 @@ jobs:

steps:
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Initialize CodeQL
uses: github/codeql-action/init@v2
uses: github/codeql-action/init@v3
with:
languages: ${{ matrix.language }}
queries: +security-and-quality

- name: Autobuild
uses: github/codeql-action/autobuild@v2
uses: github/codeql-action/autobuild@v3
if: ${{ matrix.language == 'javascript' || matrix.language == 'python' }}

- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v2
uses: github/codeql-action/analyze@v3
with:
category: "/language:${{ matrix.language }}"
8 changes: 4 additions & 4 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,12 @@ jobs:
- name: Checkout
uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v4
uses: actions/setup-python@v5
with:
python-version: '3.11'
cache: 'pip'
- name: Cache dependencies
uses: actions/cache@v3.3.1
uses: actions/cache@v4.1.2
with:
path: ~/.cache/pip
key: ${{ runner.os }}-pip-${{ hashFiles('docs/requirements.txt') }}
Expand All @@ -39,12 +39,12 @@ jobs:
- name: Checkout
uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v4
uses: actions/setup-python@v5
with:
python-version: '3.11'
cache: 'pip'
- name: Cache dependencies
uses: actions/cache@v3.3.1
uses: actions/cache@v4.1.2
with:
path: ~/.cache/pip
key: ${{ runner.os }}-pip-${{ hashFiles('docs/requirements.txt') }}
Expand Down
31 changes: 11 additions & 20 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
@@ -1,26 +1,17 @@
name: Lint
name: Ruff

on: [push, pull_request]

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
on:
push:
pull_request:

jobs:
ruff:
name: ruff
runs-on: ubuntu-latest

steps:
- name: Checkout
uses: actions/checkout@v3
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: "3.11"
cache: 'pip'
- run: |
python -m pip install --upgrade pip
pip install ruff
- name: Run Ruff
run: |
ruff djangocms_versioning tests
- uses: actions/checkout@v4

- run: python -Im pip install --user ruff

- name: Run ruff
run: ruff check --output-format=github djangocms_versioning tests
4 changes: 2 additions & 2 deletions .github/workflows/publish-to-live-pypi.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,9 @@ jobs:
permissions:
id-token: write
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Set up Python 3.10
uses: actions/setup-python@v4
uses: actions/setup-python@v5
with:
python-version: '3.10'

Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/publish-to-test-pypi.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,9 @@ jobs:
permissions:
id-token: write
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Set up Python 3.10
uses: actions/setup-python@v4
uses: actions/setup-python@v5
with:
python-version: '3.10'

Expand Down
135 changes: 110 additions & 25 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,24 +7,29 @@ concurrency:
cancel-in-progress: true

jobs:
sqlite-unit-tests:
sqlite:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
python-version: [ 3.9, "3.10", "3.11" ] # latest release minus two
python-version: [ 3.9, "3.10", "3.11", "3.12" ] # latest release minus two
requirements-file: [
dj32_cms41.txt,
dj40_cms41.txt,
dj41_cms41.txt,
dj42_cms41.txt,
dj50_cms41.txt,
dj51_cms41.txt,
]
exclude:
- requirements-file: dj50_cms41.txt
python-version: 3.9
- requirements-file: dj51_cms41.txt
python-version: 3.9

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}

uses: actions/setup-python@v3
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
Expand All @@ -34,27 +39,32 @@ jobs:
python setup.py install
- name: Run coverage
run: coverage run setup.py test
run: coverage run ./test_settings.py

- name: Upload Coverage to Codecov
uses: codecov/codecov-action@v2
uses: codecov/codecov-action@v4

postgres-unit-tests:
postgres:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
python-version: [ 3.9, "3.10", "3.11" ] # latest release minus two
python-version: [ 3.9, "3.10", "3.11", "3.12" ] # latest release minus two
requirements-file: [
dj32_cms41.txt,
dj40_cms41.txt,
dj41_cms41.txt,
dj42_cms41.txt,
dj50_cms41.txt,
dj51_cms41.txt,
]
exclude:
- requirements-file: dj50_cms41.txt
python-version: 3.9
- requirements-file: dj51_cms41.txt
python-version: 3.9

services:
postgres:
image: postgres:12
image: postgres:13
env:
POSTGRES_USER: postgres
POSTGRES_PASSWORD: postgres
Expand All @@ -65,10 +75,10 @@ jobs:
options: --health-cmd pg_isready --health-interval 10s --health-timeout 5s --health-retries 5

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}

uses: actions/setup-python@v3
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
Expand All @@ -78,25 +88,30 @@ jobs:
python setup.py install
- name: Run coverage
run: coverage run setup.py test
run: coverage run ./test_settings.py
env:
DATABASE_URL: postgres://postgres:[email protected]/postgres

- name: Upload Coverage to Codecov
uses: codecov/codecov-action@v2
uses: codecov/codecov-action@v4

mysql-unit-tests:
mysql:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
python-version: [ 3.9, "3.10", "3.11" ] # latest release minus two
python-version: [ 3.9, "3.10", "3.11", "3.12" ] # latest release minus two
requirements-file: [
dj32_cms41.txt,
dj40_cms41.txt,
dj41_cms41.txt,
dj42_cms41.txt,
dj50_cms41.txt,
dj51_cms41.txt,
]
exclude:
- requirements-file: dj50_cms41.txt
python-version: 3.9
- requirements-file: dj51_cms41.txt
python-version: 3.9

services:
mysql:
Expand All @@ -109,10 +124,10 @@ jobs:
options: --health-cmd="mysqladmin ping" --health-interval=10s --health-timeout=5s --health-retries=3

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}

uses: actions/setup-python@v3
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
Expand All @@ -122,9 +137,79 @@ jobs:
python setup.py install
- name: Run coverage
run: coverage run setup.py test
run: coverage run ./test_settings.py
env:
DATABASE_URL: mysql://[email protected]/djangocms_test

- name: Upload Coverage to Codecov
uses: codecov/codecov-action@v2
uses: codecov/codecov-action@v4

cms-develop-sqlite:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
python-version: ['3.11']
requirements-file: ['dj51_cms41.txt']
cms-version: [
'https://github.com/django-cms/django-cms/archive/develop-4.tar.gz'
]
os: [
ubuntu-20.04,
]

steps:
- uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}

uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip
python -m pip install -r tests/requirements/${{ matrix.requirements-file }}
python -m pip install ${{ matrix.cms-version }}
python setup.py install
- name: Run coverage
run: coverage run ./test_settings.py

- name: Upload Coverage to Codecov
uses: codecov/codecov-action@v4

sqlite-django-main:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
python-version: [ "3.11" ]
cms-version: [
'https://github.com/django-cms/django-cms/archive/develop-4.tar.gz'
]
django-version: [
'https://github.com/django/django/archive/main.tar.gz'
]
requirements-file: [
requirements_base.txt,
]

steps:
- uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}

uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip
python -m pip install -r tests/requirements/${{ matrix.requirements-file }}
python -m pip install ${{ matrix.cms-version }} ${{ matrix.django-version }}
python setup.py install
- name: Run coverage
run: coverage run ./test_settings.py

- name: Upload Coverage to Codecov
uses: codecov/codecov-action@v4
4 changes: 2 additions & 2 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@ repos:
- id: check-merge-conflict
- id: mixed-line-ending

- repo: https://github.com/charliermarsh/ruff-pre-commit
rev: "v0.0.264"
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.2.1
hooks:
- id: ruff
args: [--fix, --exit-non-zero-on-fix]
20 changes: 20 additions & 0 deletions .readthedocs.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# Read the Docs configuration file
# See https://docs.readthedocs.io/en/stable/config-file/v2.html for details
version: 2

build:
os: ubuntu-22.04
tools:
python: "3.11"

sphinx:
configuration: docs/conf.py
fail_on_warning: false

formats:
- epub
- pdf

python:
install:
- requirements: docs/requirements.txt
Loading

0 comments on commit 1ec0318

Please sign in to comment.