fix path handling for platform differences (#212)

This commit is contained in:
Josh Thomas 2025-09-09 13:10:03 -05:00 committed by GitHub
parent bc0b6c5cc8
commit f6286f7f46
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
7 changed files with 148 additions and 68 deletions

View file

@ -2,6 +2,7 @@ from __future__ import annotations
import json
import os
import platform
import re
from pathlib import Path
@ -92,6 +93,13 @@ def tests(session, django):
session.install(f"django=={django}")
command = ["cargo", "test"]
# TODO: Remove this exclusion once PyO3 is replaced with subprocess oracle pattern
# Temporarily exclude djls-project tests on Windows due to PyO3 DLL loading issues
# (STATUS_DLL_NOT_FOUND when the test executable tries to load Python)
if platform.system() == "Windows":
command.extend(["--workspace", "--exclude", "djls-project"])
if session.posargs:
args = []
for arg in session.posargs:
@ -136,9 +144,16 @@ def gha_matrix(session):
if session["name"] == "tests"
]
matrix = {
"include": [{**combo, "os": os} for os in os_list for combo in versions_list]
}
# Build the matrix, excluding Python 3.9 on macOS (PyO3 linking issues)
include_list = []
for os_name in os_list:
for combo in versions_list:
# Skip Python 3.9 on macOS due to PyO3/framework linking issues
if os_name.startswith("macos") and combo["python-version"] == "3.9":
continue
include_list.append({**combo, "os": os_name})
matrix = {"include": include_list}
if os.environ.get("GITHUB_OUTPUT"):
with Path(os.environ["GITHUB_OUTPUT"]).open("a") as fh: