Skip to content

Commit 2b665d8

Browse files
authored
Add test matrix for Flask 2 and latest (#38)
* update actions versions * Bump minimum python version * Minimum offered by default GH runners
1 parent 67e48bb commit 2b665d8

File tree

9 files changed

+28
-25
lines changed

9 files changed

+28
-25
lines changed

.github/workflows/release.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,11 +13,11 @@ jobs:
1313
runs-on: ubuntu-latest
1414

1515
steps:
16-
- uses: actions/checkout@v2
16+
- uses: actions/checkout@v4
1717
- name: Set up Python
18-
uses: actions/setup-python@v2
18+
uses: actions/setup-python@v5
1919
with:
20-
python-version: 3.8
20+
python-version: 3.13
2121
- name: Install pypa/build
2222
run: >-
2323
python -m

.github/workflows/test.yml

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3,27 +3,31 @@
33

44
name: Python package test
55

6-
on: [push]
6+
on:
7+
pull_request:
8+
types: [opened, synchronize]
9+
push:
10+
branches: [master]
711

812
jobs:
913
test:
1014

1115
runs-on: ubuntu-latest
1216
strategy:
1317
matrix:
14-
python-version: ["3.7", "3.8", "3.9", "3.10"]
18+
python-version: ["3.8.15", "3.13.7"]
19+
python-requirements: ["test_requirements.txt", "test_requirements_flask_2.txt"]
1520

1621
steps:
17-
- uses: actions/checkout@v2
22+
- uses: actions/checkout@v4
1823
- name: Set up Python ${{ matrix.python-version }}
19-
uses: actions/setup-python@v2
24+
uses: actions/setup-python@v5
2025
with:
2126
python-version: ${{ matrix.python-version }}
2227
- name: Install dependencies
2328
run: |
2429
python -m pip install --upgrade pip
25-
pip install -r test_requirements.txt
26-
pip install .
30+
pip install -r ${{ matrix.python-requirements }}
2731
- name: Test with pytest
2832
run: |
2933
pytest

README.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,8 @@ To install Flask-GitHubApp:
1313

1414
Or better yet, add it to your app's requirements.txt file! ;)
1515

16+
> `flask-githubapp` requires Python 3.8+ and Flask 2+
17+
1618
#### Create GitHub App
1719

1820
Follow GitHub's docs on [creating a github app](https://developer.github.com/apps/building-github-apps/creating-a-github-app/).
@@ -110,5 +112,5 @@ You can find an example on how to init all these config variables in the [cruel_
110112

111113
#### Cruel Closer
112114

113-
The cruel_closer sample app will use information of the received payload (which is received every time an issue is opened), will _find_ said issue and **close it** without regard.
115+
The cruel_closer sample app will use information of the received payload (which is received every time an issue is opened), will _find_ said issue and **close it** without regard.
114116
That's just r00d!

setup.py

Lines changed: 2 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -7,12 +7,13 @@
77
import os
88
from setuptools import setup
99

10-
with open(os.path.join(os.path.dirname(__file__), 'flask_githubapp/version.py'), 'r') as f:
10+
with open(os.path.join(os.path.dirname(__file__), 'src/flask_githubapp/version.py'), 'r') as f:
1111
exec(f.read())
1212

1313

1414
setup(
1515
name='Flask-GitHubApp',
16+
package_dir = {"": "src"},
1617
version=__version__,
1718
url='https://github.com/bradshjg/flask-githubapp',
1819
license='MIT',
@@ -28,17 +29,4 @@
2829
'flask',
2930
'github3.py'
3031
],
31-
classifiers=[
32-
'License :: OSI Approved :: MIT License',
33-
'Framework :: Flask',
34-
'Programming Language :: Python',
35-
'Programming Language :: Python :: 3.6',
36-
'Programming Language :: Python :: 3.7',
37-
'Programming Language :: Python :: 3.8',
38-
'Environment :: Web Environment',
39-
'Intended Audience :: Developers',
40-
'Operating System :: OS Independent',
41-
'Topic :: Internet :: WWW/HTTP :: Dynamic Content',
42-
'Topic :: Software Development :: Libraries :: Python Modules'
43-
]
4432
)

test_requirements.txt

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,4 @@
1+
file:.
2+
13
pytest
2-
pytest-mock
4+
pytest-mock

test_requirements_flask_2.txt

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
file:.
2+
3+
pytest
4+
pytest-mock
5+
6+
flask==2.0.0
7+
werkzeug==2.0.3

0 commit comments

Comments
 (0)