From a411d87b01ae043eab725f3a86aa3cc6a1de17ca Mon Sep 17 00:00:00 2001 From: Angelo Dini Date: Mon, 25 Mar 2024 08:34:11 +0100 Subject: [PATCH 1/3] update tests --- .github/workflows/default.yml | 67 +++++++++++++++++++++++++++++++++++ README.rst | 6 ++-- setup.cfg | 28 +++++++++++++++ tests/requirements.txt | 1 + 4 files changed, 99 insertions(+), 3 deletions(-) create mode 100644 .github/workflows/default.yml create mode 100644 setup.cfg diff --git a/.github/workflows/default.yml b/.github/workflows/default.yml new file mode 100644 index 0000000..efc264c --- /dev/null +++ b/.github/workflows/default.yml @@ -0,0 +1,67 @@ +name: Checks + +on: [push] + +jobs: + flake8: + name: flake8 + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v2 + - name: Set up Python + uses: actions/setup-python@v2 + with: + python-version: 3.12 + - name: Install flake8 + run: pip install --upgrade flake8 + - name: Run flake8 + uses: liskin/gh-problem-matcher-wrap@v1 + with: + linters: flake8 + run: flake8 + + isort: + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v2 + - name: Set up Python + uses: actions/setup-python@v2 + with: + python-version: 3.12 + - run: python -m pip install isort + - name: isort + uses: liskin/gh-problem-matcher-wrap@v1 + with: + linters: isort + run: isort -c --df aldryn_sso + + unit-tests: + runs-on: ubuntu-latest + strategy: + fail-fast: false + matrix: + python-version: ["3.8", "3.9", "3.10", "3.11", "3.12"] + django-version: ["3.2", "4.2", "5"] + exclude: + - python-version: "3.8" + requirements: "dj50" + - python-version: "3.9" + requirements: "dj50" + steps: + - uses: actions/checkout@v1 + - name: Set up Python ${{ matrix.python-version }} + uses: actions/setup-python@v2 + with: + python-version: ${{ matrix.python-version }} + - name: Install dependencies + run: | + python -m pip install --upgrade pip + pip install django==${{ matrix.django-version }} + pip install -r tests/requirements.txt + python setup.py install + - name: Run coverage + run: coverage run setup.py test + - name: Upload Coverage to Codecov + uses: codecov/codecov-action@v1 diff --git a/README.rst b/README.rst index dc3027c..078d781 100644 --- a/README.rst +++ b/README.rst @@ -216,7 +216,7 @@ You can run tests by executing:: .. |coverage| image:: https://codecov.io/gh/divio/django-simple.sso/branch/master/graph/badge.svg :target: https://codecov.io/gh/divio/django-simple.sso -.. |python| image:: https://img.shields.io/badge/python-3.5+-blue.svg - :target: https://pypi.org/project/django-simple.sso/ -.. |django| image:: https://img.shields.io/badge/django-2.2,%203.0,%203.1-blue.svg +.. |python| image:: https://img.shields.io/badge/python-3.8+-blue.svg + :target: https://pypi.org/project/aldryn-addons/ +.. |django| image:: https://img.shields.io/badge/django-3.2,%204.2,%205.0-blue.svg :target: https://www.djangoproject.com/ diff --git a/setup.cfg b/setup.cfg new file mode 100644 index 0000000..da0094d --- /dev/null +++ b/setup.cfg @@ -0,0 +1,28 @@ +[flake8] +max-line-length = 119 +exclude = + *.egg-info, + .eggs, + .git, + .settings, + .tox, + build, + data, + dist, + docs, + *migrations*, + requirements, + tmp + +[isort] +line_length = 119 +skip = manage.py, *migrations*, .tox, .eggs, data +include_trailing_comma = true +multi_line_output = 5 +not_skip = __init__.py +lines_after_imports = 2 +default_section = THIRDPARTY +sections = FUTURE, STDLIB, DJANGO, CMS, THIRDPARTY, FIRSTPARTY, LIB, LOCALFOLDER +known_first_party = aldryn_sso +known_cms = cms, menus +known_django = django diff --git a/tests/requirements.txt b/tests/requirements.txt index 288b4fa..e898853 100644 --- a/tests/requirements.txt +++ b/tests/requirements.txt @@ -1,3 +1,4 @@ tox coverage flake8 +packaging From 78385b7aea0c30ff864df92884f2defa4fda674c Mon Sep 17 00:00:00 2001 From: Angelo Dini Date: Mon, 25 Mar 2024 10:26:50 +0100 Subject: [PATCH 2/3] trigger build From 5fb4e3059cbe22bcc4f26924819159f95d5092b2 Mon Sep 17 00:00:00 2001 From: Angelo Dini Date: Mon, 25 Mar 2024 10:28:33 +0100 Subject: [PATCH 3/3] adapt readme --- CHANGELOG.rst | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/CHANGELOG.rst b/CHANGELOG.rst index a091376..4c44ba5 100644 --- a/CHANGELOG.rst +++ b/CHANGELOG.rst @@ -2,6 +2,14 @@ Changelog ========= + +1.3.0 (unreleased) +================== + +* Update testing configuration to Django 4.2 and 5.0 +* Update readme to reflect latest Python and Django support + + 1.2.0 (2022-12-14) ==================