Skip to content

Commit 0782553

Browse files
Test with Python 3.13
1 parent cb7e434 commit 0782553

File tree

5 files changed

+45
-19
lines changed

5 files changed

+45
-19
lines changed

.github/workflows/ci.yml

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,17 +11,27 @@ jobs:
1111
runs-on: ubuntu-20.04
1212

1313
strategy:
14+
fail-fast: false
1415
matrix:
15-
python-version: [3.6, 3.7, 3.8, 3.9, "3.10", "3.11", "3.12"]
16+
python-version:
17+
- 3.6
18+
- 3.7
19+
- 3.8
20+
- 3.9
21+
- "3.10"
22+
- "3.11"
23+
- "3.12"
24+
- "3.13"
1625

1726
steps:
1827
- name: Checkout
19-
uses: actions/checkout@v3
28+
uses: actions/checkout@v4
2029

2130
- name: Setup Python ${{ matrix.python-version }}
22-
uses: actions/setup-python@v4
31+
uses: actions/setup-python@v5
2332
with:
2433
python-version: ${{ matrix.python-version }}
34+
allow-prereleases: true
2535

2636
- name: Pin pip version
2737
run: |

Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ ENV PATH $PYENV_ROOT/shims:$PYENV_ROOT/bin:$PATH
1010
RUN git clone --depth=1 https://github.com/pyenv/pyenv.git $PYENV_ROOT
1111
RUN git clone --depth=1 https://github.com/pyenv/pyenv-virtualenv.git $PYENV_ROOT/plugins/pyenv-virtualenv
1212

13-
RUN pyenv install 3.5.10 && pyenv install 3.6.14 && pyenv install 3.7.11 && pyenv install 3.8.11 && pyenv install 3.9.6 && pyenv install 3.10.1 && pyenv install 3.11.0 && pyenv install 3.12.1
13+
RUN pyenv install 3.5.10 && pyenv install 3.6.15 && pyenv install 3.7.17 && pyenv install 3.8.19 && pyenv install 3.9.19 && pyenv install 3.10.14 && pyenv install 3.11.9 && pyenv install 3.12.5 && pyenv install 3.13.0rc1
1414

1515
WORKDIR /app
1616
COPY . .

requirements-test.txt

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ pytest==4.6.11; python_version < '3.10.0'
22
pytest==6.2.5; python_version >= '3.10.0'
33
attrs==21.2.0
44
httmock==1.4.0
5-
freezegun==1.1.0
5+
freezegun==1.1.0; python_version < '3.13'
6+
freezegun==1.5.1; python_version >= '3.13'
67
pytest-cov
78
coveralls==3.3.1

run-tests.sh

Lines changed: 28 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -24,68 +24,77 @@ function deploy {
2424
source deactivate
2525
fi
2626

27-
# pyenv install 3.6.14
27+
# pyenv install 3.6.15
2828
if [ ! -e ~/.pyenv/versions/tracker36 ]; then
29-
pyenv virtualenv 3.6.14 tracker36
29+
pyenv virtualenv 3.6.15 tracker36
3030
pyenv activate tracker36
3131
pip install .
3232
pip install -r requirements-test.txt
3333
source deactivate
3434
fi
3535

36-
# pyenv install 3.7.11
36+
# pyenv install 3.7.17
3737
if [ ! -e ~/.pyenv/versions/tracker37 ]; then
38-
pyenv virtualenv 3.7.11 tracker37
38+
pyenv virtualenv 3.7.17 tracker37
3939
pyenv activate tracker37
4040
pip install .
4141
pip install -r requirements-test.txt
4242
source deactivate
4343
fi
4444

45-
# pyenv install 3.8.11
45+
# pyenv install 3.8.19
4646
if [ ! -e ~/.pyenv/versions/tracker38 ]; then
47-
pyenv virtualenv 3.8.11 tracker38
47+
pyenv virtualenv 3.8.19 tracker38
4848
pyenv activate tracker38
4949
pip install .
5050
pip install -r requirements-test.txt
5151
source deactivate
5252
fi
5353

54-
# pyenv install 3.9.6
54+
# pyenv install 3.9.19
5555
if [ ! -e ~/.pyenv/versions/tracker39 ]; then
56-
pyenv virtualenv 3.9.6 tracker39
56+
pyenv virtualenv 3.9.19 tracker39
5757
pyenv activate tracker39
5858
pip install .
5959
pip install -r requirements-test.txt
6060
source deactivate
6161
fi
6262

63-
# pyenv install 3.10.1
63+
# pyenv install 3.10.14
6464
if [ ! -e ~/.pyenv/versions/tracker310 ]; then
65-
pyenv virtualenv 3.10.1 tracker310
65+
pyenv virtualenv 3.10.14 tracker310
6666
pyenv activate tracker310
6767
pip install .
6868
pip install -r requirements-test.txt
6969
source deactivate
7070
fi
7171

72-
# pyenv install 3.11.0
72+
# pyenv install 3.11.9
7373
if [ ! -e ~/.pyenv/versions/tracker311 ]; then
74-
pyenv virtualenv 3.11.0 tracker311
74+
pyenv virtualenv 3.11.9 tracker311
7575
pyenv activate tracker311
7676
pip install .
7777
pip install -r requirements-test.txt
7878
source deactivate
7979
fi
8080

81-
# pyenv install 3.12.0
81+
# pyenv install 3.12.5
8282
if [ ! -e ~/.pyenv/versions/tracker312 ]; then
83-
pyenv virtualenv 3.12.0 tracker312
83+
pyenv virtualenv 3.12.5 tracker312
8484
pyenv activate tracker312
8585
pip install .
8686
pip install -r requirements-test.txt
8787
source deactivate
8888
fi
89+
90+
# pyenv install 3.13.0rc1
91+
if [ ! -e ~/.pyenv/versions/tracker313 ]; then
92+
pyenv virtualenv 3.13.0rc1 tracker313
93+
pyenv activate tracker313
94+
pip install .
95+
pip install -r requirements-test.txt
96+
source deactivate
97+
fi
8998
}
9099

91100

@@ -121,6 +130,10 @@ function run_tests {
121130
pyenv activate tracker312
122131
pytest
123132
source deactivate
133+
134+
pyenv activate tracker313
135+
pytest
136+
source deactivate
124137
}
125138

126139
function refresh_deploy {
@@ -132,6 +145,7 @@ function refresh_deploy {
132145
pyenv uninstall -f tracker310
133146
pyenv uninstall -f tracker311
134147
pyenv uninstall -f tracker312
148+
pyenv uninstall -f tracker313
135149
}
136150

137151

setup.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,7 @@
6363
"Programming Language :: Python :: 3.10",
6464
"Programming Language :: Python :: 3.11",
6565
"Programming Language :: Python :: 3.12",
66+
"Programming Language :: Python :: 3.13",
6667
"Operating System :: OS Independent",
6768
],
6869
install_requires=["requests>=2.25.1,<3.0", "typing_extensions>=3.7.4"],

0 commit comments

Comments
 (0)