Skip to content

Commit 605dcf3

Browse files
Add free-threading and pypy CI builds (#347)
* simplify CI scripting * add pypy and 3.14t to CI * fix warnings during tests
1 parent 0ba1b92 commit 605dcf3

File tree

4 files changed

+32
-49
lines changed

4 files changed

+32
-49
lines changed

.github/workflows/tests.yml

Lines changed: 20 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -11,56 +11,51 @@ jobs:
1111
name: lint
1212
runs-on: ubuntu-latest
1313
steps:
14-
- uses: actions/checkout@v3
15-
- uses: actions/setup-python@v3
16-
- run: python -m pip install --upgrade pip wheel
17-
- run: pip install tox tox-gh-actions
14+
- uses: actions/checkout@v6
15+
- uses: actions/setup-python@v6
16+
- run: python -m pip install --upgrade pip wheel tox
1817
- run: tox -eflake8
1918
- run: tox -edocs
2019
tests:
2120
name: tests
2221
strategy:
2322
matrix:
2423
os: [ubuntu-latest, macos-latest, windows-latest]
25-
python: ['3.8', '3.9', '3.10', '3.11', '3.12', '3.13', '3.14']
24+
python: ['3.8', '3.9', '3.10', '3.11', '3.12', '3.13', '3.14', '3.14t', 'pypy3.11']
2625
fail-fast: false
2726
runs-on: ${{ matrix.os }}
2827
steps:
29-
- uses: actions/checkout@v3
30-
- uses: actions/setup-python@v3
28+
- uses: actions/checkout@v6
29+
- uses: actions/setup-python@v6
3130
with:
3231
python-version: ${{ matrix.python }}
33-
- run: python -m pip install --upgrade pip wheel
34-
- run: pip install tox tox-gh-actions
32+
- run: python -m pip install --upgrade pip wheel tox
3533
- run: tox
3634
tests-micropython:
3735
name: tests-micropython
3836
runs-on: ubuntu-latest
3937
steps:
40-
- uses: actions/checkout@v3
41-
- uses: actions/setup-python@v3
42-
- run: python -m pip install --upgrade pip wheel
43-
- run: pip install tox tox-gh-actions
38+
- uses: actions/checkout@v6
39+
- uses: actions/setup-python@v6
40+
- run: python -m pip install --upgrade pip wheel tox
4441
- run: tox -eupy
4542
tests-circuitpython:
4643
name: tests-circuitpython
4744
runs-on: ubuntu-latest
4845
steps:
49-
- uses: actions/checkout@v3
50-
- uses: actions/setup-python@v3
51-
- run: python -m pip install --upgrade pip wheel
52-
- run: pip install tox tox-gh-actions
46+
- uses: actions/checkout@v6
47+
- uses: actions/setup-python@v6
48+
- run: python -m pip install --upgrade pip wheel tox
5349
- run: tox -ecpy
5450
coverage:
5551
name: coverage
5652
runs-on: ubuntu-latest
5753
steps:
58-
- uses: actions/checkout@v3
59-
- uses: actions/setup-python@v3
60-
- run: python -m pip install --upgrade pip wheel
61-
- run: pip install tox tox-gh-actions
54+
- uses: actions/checkout@v6
55+
- uses: actions/setup-python@v6
56+
- run: python -m pip install --upgrade pip wheel tox
6257
- run: tox
63-
- uses: codecov/codecov-action@v3
58+
- uses: codecov/codecov-action@v5
6459
with:
6560
files: ./coverage.xml
6661
fail_ci_if_error: true
@@ -69,8 +64,7 @@ jobs:
6964
name: benchmark
7065
runs-on: ubuntu-latest
7166
steps:
72-
- uses: actions/checkout@v3
73-
- uses: actions/setup-python@v3
74-
- run: python -m pip install --upgrade pip wheel
75-
- run: pip install tox tox-gh-actions
67+
- uses: actions/checkout@v6
68+
- uses: actions/setup-python@v6
69+
- run: python -m pip install --upgrade pip wheel tox
7670
- run: tox -ebenchmark

tests/test_login.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ def _run(self, coro):
1818

1919
def test_login(self):
2020
app = Microdot()
21-
Session(app, secret_key='secret')
21+
Session(app, secret_key='866ec558b6c14560bb0930e1fd55068d')
2222
login = Login()
2323

2424
class User:
@@ -74,7 +74,7 @@ def __init__(self, id, name):
7474
self.name = name
7575

7676
app = Microdot()
77-
Session(app, secret_key='secret')
77+
Session(app, secret_key='866ec558b6c14560bb0930e1fd55068d')
7878
login = Login()
7979

8080
@login.user_loader
@@ -105,7 +105,7 @@ def __init__(self, id, name):
105105
self.name = name
106106

107107
app = Microdot()
108-
Session(app, secret_key='secret')
108+
Session(app, secret_key='866ec558b6c14560bb0930e1fd55068d')
109109
login = Login()
110110

111111
@login.user_loader
@@ -133,7 +133,7 @@ def __init__(self, id, name):
133133
self.name = name
134134

135135
app = Microdot()
136-
Session(app, secret_key='secret')
136+
Session(app, secret_key='866ec558b6c14560bb0930e1fd55068d')
137137
login = Login()
138138

139139
@login.user_loader

tests/test_session.py

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
from microdot.session import Session, with_session
55
from microdot.test_client import TestClient
66

7-
session_ext = Session(secret_key='top-secret!')
7+
session_ext = Session(secret_key='866ec558b6c14560bb0930e1fd55068d')
88

99

1010
class TestSession(unittest.TestCase):
@@ -19,7 +19,8 @@ def _run(self, coro):
1919

2020
def test_session_async(self):
2121
app = Microdot()
22-
session_ext.initialize(app, secret_key='some-other-secret')
22+
session_ext.initialize(
23+
app, secret_key='34fcd06506b843169698c8d25043f03a')
2324
client = TestClient(app)
2425

2526
@app.get('/')
@@ -85,7 +86,7 @@ def index(req):
8586

8687
def test_session_default_path(self):
8788
app = Microdot()
88-
Session(app, secret_key='some-other-secret')
89+
Session(app, secret_key='34fcd06506b843169698c8d25043f03a')
8990
client = TestClient(app)
9091

9192
@app.get('/')
@@ -117,9 +118,10 @@ def delete(req, session):
117118
def test_session_custom_path(self):
118119
app = Microdot()
119120
session_ext = Session()
120-
session_ext.initialize(app, secret_key='some-other-secret',
121-
cookie_options={'path': '/child',
122-
'http_only': False})
121+
session_ext.initialize(
122+
app, secret_key='34fcd06506b843169698c8d25043f03a',
123+
cookie_options={'path': '/child',
124+
'http_only': False})
123125
client = TestClient(app)
124126

125127
@app.get('/')

tox.ini

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,5 @@
11
[tox]
2-
envlist=flake8,py38,py39,py310,py311,py312,py313,py314upy,cpy,benchmark,docs
32
skipsdist=True
4-
skip_missing_interpreters=True
5-
6-
[gh-actions]
7-
python =
8-
3.8: py38
9-
3.9: py39
10-
3.10: py310
11-
3.11: py311
12-
3.12: py312
13-
3.13: py313
14-
3.14: py314
15-
pypy3: pypy3
163

174
[testenv]
185
commands=

0 commit comments

Comments
 (0)