Skip to content

Commit

Permalink
test: Start testing with Python 3.13
Browse files Browse the repository at this point in the history
  • Loading branch information
edgarrmondragon committed Aug 8, 2024
1 parent 75eb494 commit c4529f5
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 4 deletions.
11 changes: 9 additions & 2 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,17 +41,23 @@ jobs:
runs-on: ${{ matrix.os }}
continue-on-error: true
env:
NOXPYTHON: ${{ matrix.python-version }}
NOXFORCEPYTHON: ${{ matrix.python-version }}
NOXSESSION: ${{ matrix.session }}
strategy:
fail-fast: false
matrix:
session: [tests]
os: ["ubuntu-latest", "macos-latest", "windows-latest"]
python-version: ["3.8", "3.9", "3.10", "3.11", "3.12"]
python-version:
- "3.8"
- "3.9"
- "3.10"
- "3.11"
- "3.12"
sqlalchemy: ["2"]
include:
- { session: tests, python-version: "3.12", os: "ubuntu-latest", sqlalchemy: "1" }
- { session: tests, python-version: "3.13", os: "ubuntu-latest", sqlalchemy: "2" }
- { session: doctest, python-version: "3.12", os: "ubuntu-latest", sqlalchemy: "2" }
- { session: mypy, python-version: "3.12", os: "ubuntu-latest", sqlalchemy: "2" }
- { session: deps, python-version: "3.12", os: "ubuntu-latest", sqlalchemy: "2" }
Expand All @@ -74,6 +80,7 @@ jobs:
- uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
allow-prereleases: true

- name: Upgrade pip
env:
Expand Down
20 changes: 18 additions & 2 deletions noxfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
import shutil
import sys
import tempfile
import typing as t
from pathlib import Path
from textwrap import dedent

Expand Down Expand Up @@ -45,7 +46,7 @@
)

poetry_config = nox.project.load_toml("pyproject.toml")["tool"]["poetry"]
test_dependencies = poetry_config["group"]["dev"]["dependencies"].keys()
test_dependencies: dict[str, t.Any] = poetry_config["group"]["dev"]["dependencies"]
typing_dependencies = poetry_config["group"]["typing"]["dependencies"].keys()


Expand All @@ -63,7 +64,22 @@ def mypy(session: Session) -> None:
@session(python=python_versions)
def tests(session: Session) -> None:
"""Execute pytest tests and compute coverage."""
session.install(".[faker,jwt,parquet,s3]")
extras = [
"faker",
"jwt",
"parquet",
"s3",
]

if session.python == "3.13":
# https://github.com/apache/arrow/issues/43519
extras.remove("parquet")

# https://github.com/duckdb/duckdb/discussions/13352
test_dependencies.pop("duckdb")
test_dependencies.pop("duckdb-engine")

session.install(f".[{','.join(extras)}]")
session.install(*test_dependencies)

sqlalchemy_version = os.environ.get("SQLALCHEMY_VERSION")
Expand Down

0 comments on commit c4529f5

Please sign in to comment.