Skip to content

Commit 0e2c1e8

Browse files
authored
Update integration-testing.yml
1 parent 3040915 commit 0e2c1e8

File tree

1 file changed

+34
-13
lines changed

1 file changed

+34
-13
lines changed

.github/workflows/integration-testing.yml

Lines changed: 34 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -28,27 +28,48 @@ jobs:
2828
repository: googleapis/python-bigquery-magics
2929
path: python-bigquery-magics
3030

31-
- name: Install and test
31+
- name: Diagnose Test Environment
3232
run: |
3333
set -e
34+
echo "--- Preparing Environment ---"
3435
python -m venv venv
3536
. venv/bin/activate
36-
pip install pytest
37+
pip install pytest build
3738
38-
# Install spanner-graph-notebook in "editable" mode from its source directory.
39-
# This makes the source code directly importable by other packages in the same
40-
# environment, which is the standard way to handle local dependencies in CI.
41-
# This will also install all of its dependencies like 'portpicker'.
42-
pip install -e .
39+
echo "--- Building Wheel ---"
40+
python -m build
4341

44-
# Now, install python-bigquery-magics. Since spanner-graph-notebook is already
45-
# available in the environment, pip will not try to download it again.
42+
echo "--- Checking out python-bigquery-magics ---"
43+
git clone https://github.com/googleapis/python-bigquery-magics.git
44+
45+
echo "--- Installing Dependencies ---"
46+
# Using the two-step install that you confirmed you used last
47+
pip install dist/*.whl
4648
pip install ./python-bigquery-magics
47-
4849
pip install google-cloud-testutils
4950

50-
# Change directory into the bigquery-magics checkout to run its tests.
51-
cd python-bigquery-magics
51+
# --- DIAGNOSTICS START ---
52+
echo "--- DIAGNOSTICS ---"
53+
54+
echo "[Step 1] Checking executable paths..."
55+
which python
56+
which pip
57+
58+
echo "\n[Step 2] Listing all installed packages..."
59+
pip freeze
60+
61+
echo "\n[Step 3] Checking content of site-packages..."
62+
ls -lR venv/lib/python3.11/site-packages/ | grep "spanner" || echo "spanner-graph-notebook not found in site-packages"
5263

53-
# Run the tests. They should now be able to import spanner_graphs correctly.
64+
echo "\n[Step 4] Checking Python's import path..."
65+
python -c "import sys; from pprint import pprint; pprint(sys.path)"
66+
67+
echo "\n[Step 5] Attempting a direct import..."
68+
python -c "from spanner_graphs import graph_visualization" && echo "==> Direct import of graph_visualization SUCCEEDED" || echo "==> Direct import of graph_visualization FAILED"
69+
python -c "import spanner_graphs" && echo "==> Direct import of spanner_graphs SUCCEEDED" || echo "==> Direct import of spanner_graphs FAILED"
70+
71+
# --- DIAGNOSTICS END ---
72+
73+
echo "\n--- Running Tests ---"
74+
cd python-bigquery-magics
5475
pytest -v tests/unit/test_graph_server.py tests/unit/bigquery/test_bigquery.py

0 commit comments

Comments
 (0)