Skip to content

Commit

Permalink
Merge pull request #42 from thepubclub/wagtail-50
Browse files Browse the repository at this point in the history
Test against wagtail 5
  • Loading branch information
nickmoreton authored Aug 1, 2023
2 parents 8599a13 + 21c47b5 commit 3f55c40
Show file tree
Hide file tree
Showing 6 changed files with 18 additions and 28 deletions.
20 changes: 7 additions & 13 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,8 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
python: ["3.7", "3.8", "3.9", "3.10", "3.11"]
python: ["3.8", "3.9", "3.10", "3.11"]
database: ["sqlite"]

steps:
- uses: actions/checkout@v3
- name: Setup Python
Expand All @@ -43,9 +42,8 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
python: ["3.7", "3.8", "3.9", "3.10", "3.11"]
python: ["3.8", "3.9", "3.10", "3.11"]
database: ["postgres"]

services:
postgres:
image: postgres
Expand All @@ -56,7 +54,6 @@ jobs:
ports:
- 5432:5432
options: --health-cmd pg_isready --health-interval 10s --health-timeout 5s --health-retries 5

steps:
- name: Checkout repository
uses: actions/checkout@v3
Expand Down Expand Up @@ -84,27 +81,24 @@ jobs:
DB_PORT: 5432
DATABASE: ${{ matrix.database }}


test-mysql:
runs-on: ubuntu-latest
strategy:
matrix:
python: ["3.7", "3.8", "3.9", "3.10", "3.11"]
python: ["3.8", "3.9", "3.10", "3.11"]
database: ["mysql"]

services:
mariadb:
image: mariadb
image: mysql:8.0
env:
MYSQL_ROOT_PASSWORD: mysql
MYSQL_ROOT_PASSWORD: root
options: >-
--health-cmd "mysqladmin ping"
--health-interval 10s
--health-timeout 5s
--health-retries 5
ports:
- 3306:3306

steps:
- name: Checkout repository
uses: actions/checkout@v3
Expand All @@ -125,9 +119,9 @@ jobs:
run: |
tox
env:
DB_NAME: mysql
DB_NAME: test
DB_USER: root
DB_PASSWORD: mysql
DB_PASSWORD: root
DB_HOST: 127.0.0.1
DB_PORT: 3306
DATABASE: ${{ matrix.database }}
10 changes: 5 additions & 5 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,23 +4,23 @@ repos:
hooks:
- id: isort
- repo: https://github.com/psf/black
rev: 23.3.0
rev: 23.7.0
hooks:
- id: black
- repo: https://github.com/pycqa/flake8
rev: 6.0.0
rev: 6.1.0
hooks:
- id: flake8
- repo: https://github.com/jackdewinter/pymarkdown
rev: v0.9.9
rev: v0.9.12
hooks:
- id: pymarkdown
args:
- --disable-rules
- line-length
- scan
- repo: https://github.com/asottile/blacken-docs
rev: 1.13.0
rev: 1.15.0
hooks:
- id: blacken-docs
additional_dependencies: [black==22.10.0]
additional_dependencies: [black==23.7.0]
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
- [General tidy up around tests and docs](https://github.com/nickmoreton/wagtail-qrcode/pull/28)
- Drop older versions
- Move tests and tes with postgres and mysql as well as sqlite
- Test against wagtail 5.0 <https://github.com/thepubclub/wagtail-qrcode/pull/42>

## [1.0.0] - 2022-09-09

Expand Down
2 changes: 0 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,6 @@ from wagtail_qrcode.models import QRCodeMixin


class QRCodePage(QRCodeMixin, Page):

qrcode_panels = QRCodeMixin.panels + [
MultiFieldPanel(
[
Expand Down Expand Up @@ -111,7 +110,6 @@ from wagtail_qrcode.models import QRCodeMixin


class QRCodePage(QRCodeMixin, Page):

qrcode_panels = QRCodeMixin.panels

edit_handler = TabbedInterface(
Expand Down
7 changes: 3 additions & 4 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,18 +29,17 @@
"Operating System :: OS Independent",
"Programming Language :: Python",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.7",
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Framework :: Django",
"Framework :: Django :: 3.2",
"Framework :: Django :: 4.0",
"Framework :: Django :: 4.1",
"Framework :: Django :: 4.2",
"Framework :: Wagtail",
"Framework :: Wagtail :: 2",
"Framework :: Wagtail :: 3",
"Framework :: Wagtail :: 4",
"Framework :: Wagtail :: 5",
],
install_requires=["Wagtail>=4.1", "PyQRCode>=1,<2"],
extras_require={
Expand Down
6 changes: 2 additions & 4 deletions tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,11 @@ usedevelop = True
skip_missing_interpreters = True

envlist =
py{37}-dj{32}-wt{41,42}-{sqlite,postgres,mysql}
py{38,39,310}-dj{32,41}-wt{41,42}-{sqlite,postgres,mysql}
py{311}-dj{41,42}-wt{41,42,50}-{sqlite,postgres,mysql}
py{38,39,310}-dj{32,41}-wt{41,42,50}-{sqlite,postgres,mysql}
py{311}-dj{41,42}-wt{50}-{sqlite,postgres,mysql}

[gh-actions]
python =
3.7: py37
3.8: py38
3.9: py39
3.10: py310
Expand Down

0 comments on commit 3f55c40

Please sign in to comment.