From a4d06abebb92e587da8efc277303efe949878b14 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Edgar=20Ram=C3=ADrez-Mondrag=C3=B3n?= Date: Sun, 28 Jul 2024 13:30:29 -0600 Subject: [PATCH] Test with Python 3.13 --- .github/workflows/ci.yml | 16 ++++++++++++--- Dockerfile | 2 +- requirements-test.txt | 5 +++-- run-tests.sh | 42 ++++++++++++++++++++++++++-------------- setup.py | 1 + 5 files changed, 46 insertions(+), 20 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 85929119..fd079ba1 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -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: | diff --git a/Dockerfile b/Dockerfile index ba2948f6..bab38d56 100644 --- a/Dockerfile +++ b/Dockerfile @@ -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.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 WORKDIR /app COPY . . diff --git a/requirements-test.txt b/requirements-test.txt index 55463d8c..cde305f6 100644 --- a/requirements-test.txt +++ b/requirements-test.txt @@ -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 diff --git a/run-tests.sh b/run-tests.sh index 23b13a73..e582f4bb 100755 --- a/run-tests.sh +++ b/run-tests.sh @@ -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.19 if [ ! -e ~/.pyenv/versions/tracker38 ]; then - pyenv virtualenv 3.8.11 tracker38 + pyenv virtualenv 3.8.19 tracker38 pyenv activate tracker38 pip install . pip install -r requirements-test.txt source deactivate fi - # pyenv install 3.9.6 + # pyenv install 3.9.19 if [ ! -e ~/.pyenv/versions/tracker39 ]; then - pyenv virtualenv 3.9.6 tracker39 + pyenv virtualenv 3.9.19 tracker39 pyenv activate tracker39 pip install . pip install -r requirements-test.txt source deactivate fi - # pyenv install 3.10.1 + # pyenv install 3.10.14 if [ ! -e ~/.pyenv/versions/tracker310 ]; then - pyenv virtualenv 3.10.1 tracker310 + pyenv virtualenv 3.10.14 tracker310 pyenv activate tracker310 pip install . pip install -r requirements-test.txt source deactivate fi - # pyenv install 3.11.0 + # pyenv install 3.11.9 if [ ! -e ~/.pyenv/versions/tracker311 ]; then - pyenv virtualenv 3.11.0 tracker311 + pyenv virtualenv 3.11.9 tracker311 pyenv activate tracker311 pip install . pip install -r requirements-test.txt source deactivate fi - # pyenv install 3.12.0 + # pyenv install 3.12.5 if [ ! -e ~/.pyenv/versions/tracker312 ]; then - pyenv virtualenv 3.12.0 tracker312 + pyenv virtualenv 3.12.5 tracker312 pyenv activate tracker312 pip install . pip install -r requirements-test.txt source deactivate fi + + # pyenv install 3.13.0rc1 + if [ ! -e ~/.pyenv/versions/tracker313 ]; then + pyenv virtualenv 3.13.0rc1 tracker313 + pyenv activate tracker313 + pip install . + pip install -r requirements-test.txt + source deactivate + fi } @@ -121,6 +130,10 @@ function run_tests { pyenv activate tracker312 pytest source deactivate + + pyenv activate tracker313 + pytest + source deactivate } function refresh_deploy { @@ -132,6 +145,7 @@ function refresh_deploy { pyenv uninstall -f tracker310 pyenv uninstall -f tracker311 pyenv uninstall -f tracker312 + pyenv uninstall -f tracker313 } diff --git a/setup.py b/setup.py index d0ef7f04..9c13b024 100644 --- a/setup.py +++ b/setup.py @@ -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"],