Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix GitHub Workflow and add Python 3.11 Support #2323

Merged
merged 10 commits into from
Jan 27, 2023
27 changes: 16 additions & 11 deletions .github/workflows/test.yaml
Original file line number Diff line number Diff line change
@@ -1,19 +1,23 @@
name: Run tests
on:
- pull_request
- push
push:
branches:
- master
pull_request:
branches:
- master

jobs:
test-job:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ['3.6', '3.7', '3.8', '3.9', '3.10']
python-version: ['3.7', '3.8', '3.9', '3.10', '3.11']
tox-version: [ 'WTForms2' ]
include:
- python-version: 3.6
- python-version: 3.11
tox-version: flake8
- python-version: 3.6
- python-version: 3.11
tox-version: docs-html
services:
# Label used to access the service container
Expand Down Expand Up @@ -43,17 +47,18 @@ jobs:
ports:
- 10000:10000
steps:
# Downloads a copy of the code in your repository before running CI tests
- name: Install Ubuntu packages
run: |
sudo apt-get update
sudo apt-get install -y libgeos-c1v5
- name: Check out repository code
uses: actions/checkout@v2
- name: Install postgis
run: sudo apt-get install -y postgis postgresql-12-postgis-3 postgresql-12-postgis-3-scripts
- name: Setup postgis
uses: actions/checkout@v3
- name: Set up PostgreSQL hstore module
env:
PGPASSWORD: postgres
run: psql -U postgres -h localhost -c 'CREATE EXTENSION hstore;' flask_admin_test
- name: Set up Python
uses: actions/setup-python@v2
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Install tox
Expand Down
3 changes: 2 additions & 1 deletion requirements-dev.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
flake8
Flask>=0.7
Flask<=2.0.0
werkzeug<=2.0.0
Flask-SQLAlchemy>=0.15
peewee
wtf-peewee
Expand Down
1 change: 1 addition & 0 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,7 @@ def grep(attrname):
'Programming Language :: Python :: 3.8',
'Programming Language :: Python :: 3.9',
'Programming Language :: Python :: 3.10',
'Programming Language :: Python :: 3.11',
],
test_suite='flask_admin.tests'
)
3 changes: 2 additions & 1 deletion tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ usedevelop = true
deps =
WTForms1: WTForms==1.0.5
WTForms2: WTForms>=2.0
-Ur{toxinidir}/requirements-dev.txt
-r requirements-dev.txt
commands =
pytest -v flask_admin/tests --cov=flask_admin --cov-report=html

Expand All @@ -30,4 +30,5 @@ commands = flake8 flask_admin
deps =
sphinx
sphinx-intl
-r requirements-dev.txt
commands = sphinx-build -b html -d build/doctrees doc build/html