Skip to content

A reactive notebook for Python — run reproducible experiments, query with SQL, execute as a script, deploy as an app, and version with git. Stored as pure Python. All in a modern, AI-native editor.

ci(test_be): use uv-managed Python instead of setup-python (#9282)

Akshay Agrawal7f02e8a2eca5
diff --git a/.github/workflows/test_be.yaml b/.github/workflows/test_be.yaml
index b7be17bb6a..3540940100 100644
--- a/.github/workflows/test_be.yaml
+++ b/.github/workflows/test_be.yaml
@@ -149,8 +149,14 @@ jobs:
with:
fetch-depth: 0 # Fetch all history for git diff
+ # Use uv's managed Python rather than the hostedtoolcache build from
+ # actions/setup-python: the hostedtoolcache interpreter has ABI quirks
+ # that caused numpy/matplotlib lazy submodule imports to fail on CI.
- name: 🐍 Setup uv
uses: astral-sh/setup-uv@37802adc94f370d6bfd71619e3f0bf239e1f3b78 # v7
+ with:
+ python-version: ${{ matrix.python-version }}
+ enable-cache: true
# This step is needed since some of our tests rely on the index.html file
- name: Create assets directory, copy over index.html
@@ -159,11 +165,6 @@ jobs:
cp frontend/index.html marimo/_static/index.html
cp frontend/public/favicon.ico marimo/_static/favicon.ico
- # Required since python3.14 not pulled automatically for now.
- - uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6
- with:
- python-version: ${{ matrix.python-version }}
-
# Setup test flags based on conditions
- name: Setup test flags
id: setup-flags
diff --git a/packages/pytest_changed/__init__.py b/packages/pytest_changed/__init__.py
index 14ee1c67f3..a51c7ca9fe 100644
--- a/packages/pytest_changed/__init__.py
+++ b/packages/pytest_changed/__init__.py
@@ -253,6 +253,13 @@ def pytest_configure(config: pytest.Config) -> None:
pytest.exit("Not in a git repository", returncode=1)
raise UnreachableError("Not in a git repository") from e
+ # When --include-unchanged is set, we always run all tests, so skip the
+ # (expensive) changed-file detection and dependency-graph analysis.
+ if config.getoption("include_unchanged"):
+ print_("--include-unchanged set - running all tests")
+ config.option.changed_test_files = None
+ return
+
# Get test base directory from args or fall back to repo root
test_base = get_test_base(config, repo_root)