Skip to content

Commit

Permalink
Test with Python 3.13
Browse files Browse the repository at this point in the history
  • Loading branch information
edgarrmondragon committed Oct 7, 2024
1 parent cb7e434 commit fad029f
Show file tree
Hide file tree
Showing 5 changed files with 46 additions and 20 deletions.
16 changes: 13 additions & 3 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,17 +11,27 @@ jobs:
runs-on: ubuntu-20.04

strategy:
fail-fast: false
matrix:
python-version: [3.6, 3.7, 3.8, 3.9, "3.10", "3.11", "3.12"]
python-version:
- 3.6
- 3.7
- 3.8
- 3.9
- "3.10"
- "3.11"
- "3.12"
- "3.13"

steps:
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Setup Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
allow-prereleases: true

- name: Pin pip version
run: |
Expand Down
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ ENV PATH $PYENV_ROOT/shims:$PYENV_ROOT/bin:$PATH
RUN git clone --depth=1 https://github.com/pyenv/pyenv.git $PYENV_ROOT
RUN git clone --depth=1 https://github.com/pyenv/pyenv-virtualenv.git $PYENV_ROOT/plugins/pyenv-virtualenv

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
RUN pyenv install 3.5.10 && pyenv install 3.6.15 && pyenv install 3.7.17 && pyenv install 3.8.20 && pyenv install 3.9.20 && pyenv install 3.10.15 && pyenv install 3.11.10 && pyenv install 3.12.7 && pyenv install 3.13.0

WORKDIR /app
COPY . .
Expand Down
5 changes: 3 additions & 2 deletions requirements-test.txt
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
pytest==4.6.11; python_version < '3.10.0'
pytest==6.2.5; python_version >= '3.10.0'
pytest==8.3.2; python_version >= '3.10.0'
attrs==21.2.0
httmock==1.4.0
freezegun==1.1.0
freezegun==1.1.0; python_version < '3.13'
freezegun==1.5.1; python_version >= '3.13'
pytest-cov
coveralls==3.3.1
42 changes: 28 additions & 14 deletions run-tests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -24,68 +24,77 @@ function deploy {
source deactivate
fi

# pyenv install 3.6.14
# pyenv install 3.6.15
if [ ! -e ~/.pyenv/versions/tracker36 ]; then
pyenv virtualenv 3.6.14 tracker36
pyenv virtualenv 3.6.15 tracker36
pyenv activate tracker36
pip install .
pip install -r requirements-test.txt
source deactivate
fi

# pyenv install 3.7.11
# pyenv install 3.7.17
if [ ! -e ~/.pyenv/versions/tracker37 ]; then
pyenv virtualenv 3.7.11 tracker37
pyenv virtualenv 3.7.17 tracker37
pyenv activate tracker37
pip install .
pip install -r requirements-test.txt
source deactivate
fi

# pyenv install 3.8.11
# pyenv install 3.8.20
if [ ! -e ~/.pyenv/versions/tracker38 ]; then
pyenv virtualenv 3.8.11 tracker38
pyenv virtualenv 3.8.20 tracker38
pyenv activate tracker38
pip install .
pip install -r requirements-test.txt
source deactivate
fi

# pyenv install 3.9.6
# pyenv install 3.9.20
if [ ! -e ~/.pyenv/versions/tracker39 ]; then
pyenv virtualenv 3.9.6 tracker39
pyenv virtualenv 3.9.20 tracker39
pyenv activate tracker39
pip install .
pip install -r requirements-test.txt
source deactivate
fi

# pyenv install 3.10.1
# pyenv install 3.10.15
if [ ! -e ~/.pyenv/versions/tracker310 ]; then
pyenv virtualenv 3.10.1 tracker310
pyenv virtualenv 3.10.15 tracker310
pyenv activate tracker310
pip install .
pip install -r requirements-test.txt
source deactivate
fi

# pyenv install 3.11.0
# pyenv install 3.11.10
if [ ! -e ~/.pyenv/versions/tracker311 ]; then
pyenv virtualenv 3.11.0 tracker311
pyenv virtualenv 3.11.10 tracker311
pyenv activate tracker311
pip install .
pip install -r requirements-test.txt
source deactivate
fi

# pyenv install 3.12.0
# pyenv install 3.12.7
if [ ! -e ~/.pyenv/versions/tracker312 ]; then
pyenv virtualenv 3.12.0 tracker312
pyenv virtualenv 3.12.7 tracker312
pyenv activate tracker312
pip install .
pip install -r requirements-test.txt
source deactivate
fi

# pyenv install 3.13.0
if [ ! -e ~/.pyenv/versions/tracker313 ]; then
pyenv virtualenv 3.13.0 tracker313
pyenv activate tracker313
pip install .
pip install -r requirements-test.txt
source deactivate
fi
}


Expand Down Expand Up @@ -121,6 +130,10 @@ function run_tests {
pyenv activate tracker312
pytest
source deactivate

pyenv activate tracker313
pytest
source deactivate
}

function refresh_deploy {
Expand All @@ -132,6 +145,7 @@ function refresh_deploy {
pyenv uninstall -f tracker310
pyenv uninstall -f tracker311
pyenv uninstall -f tracker312
pyenv uninstall -f tracker313
}


Expand Down
1 change: 1 addition & 0 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,7 @@
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: 3.13",
"Operating System :: OS Independent",
],
install_requires=["requests>=2.25.1,<3.0", "typing_extensions>=3.7.4"],
Expand Down

0 comments on commit fad029f

Please sign in to comment.