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 Jul 11, 2024
1 parent 9c755bf commit 309caab
Show file tree
Hide file tree
Showing 4 changed files with 214 additions and 233 deletions.
21 changes: 14 additions & 7 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,20 +41,26 @@ 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"]
sqlalchemy: ["2"]
python-version:
- "3.8"
- "3.9"
- "3.10"
- "3.11"
- "3.12"
sqlalchemy: ["sqlalchemy~=2.0"]
include:
- { session: tests, python-version: "3.12", os: "ubuntu-latest", sqlalchemy: "1" }
- { 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" }
- { session: tests, python-version: "3.12", os: "ubuntu-latest", sqlalchemy: "sqlalchemy~=1.4" }
- { session: tests, python-version: "3.13", os: "ubuntu-latest", sqlalchemy: "sqlalchemy @ https://github.com/sqlalchemy/sqlalchemy.git@main" }
- { session: doctest, python-version: "3.12", os: "ubuntu-latest", sqlalchemy: "sqlalchemy~=2.0" }
- { session: mypy, python-version: "3.12", os: "ubuntu-latest", sqlalchemy: "sqlalchemy~=2.0" }
- { session: deps, python-version: "3.12", os: "ubuntu-latest", sqlalchemy: "sqlalchemy~=2.0" }

steps:
- uses: actions/checkout@v4
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
17 changes: 13 additions & 4 deletions noxfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -61,16 +61,25 @@ 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",
]

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

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

sqlalchemy_version = os.environ.get("SQLALCHEMY_VERSION")
if sqlalchemy_version:
# Bypass nox-poetry use of --constraint so we can install a version of
# SQLAlchemy that doesn't match what's in poetry.lock.
session.poetry.session.install( # type: ignore[attr-defined]
f"sqlalchemy=={sqlalchemy_version}.*",
)
session.poetry.session.install(sqlalchemy_version) # type: ignore[attr-defined]

env = {"COVERAGE_CORE": "sysmon"} if session.python == "3.12" else {}

Expand Down
Loading

0 comments on commit 309caab

Please sign in to comment.