Skip to content

Test integration test workflow #5

Test integration test workflow

Test integration test workflow #5

name: BQ Testing
on:
pull_request:
branches: [ main ]
jobs:
test-bigquery-magics:
runs-on: ubuntu-latest
steps:
- name: Checkout spanner-graph-notebook
uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.11'
- name: Install build dependencies
run: python -m pip install build
- name: Build spanner-graph-notebook
run: python -m build
- name: Checkout python-bigquery-magics
uses: actions/checkout@v4
with:
repository: googleapis/python-bigquery-magics
path: python-bigquery-magics
- name: Install and test
run: |
set -e
python -m venv venv
. venv/bin/activate
pip install pytest
# Install the local build (from your PR) into the venv
pip install dist/*.whl
# Remove the source directory to prevent sys.path conflicts.
# The tests will use the package just installed from the wheel.
rm -rf spanner_graph_notebook
# Install bigquery-magics with the correct extras
# to run all graph and storage-related tests.
pip install ./python-bigquery-magics[spanner-graph-notebook]
pip install google-cloud-testutils
# Change directory into the bigquery-magics checkout
cd python-bigquery-magics
# Run the tests from within its own directory
pytest -v tests/unit/test_graph_server.py tests/unit/bigquery/test_bigquery.py