|
1 | 1 | name: Test Downstream Libraries
|
2 | 2 |
|
3 |
| -on: |
4 |
| - pull_request: |
5 |
| - push: |
6 |
| - branches: [main] |
| 3 | +on: |
| 4 | + workflow_call: |
| 5 | + workflow_dispatch: |
7 | 6 |
|
8 | 7 | jobs:
|
9 | 8 | altair:
|
@@ -230,3 +229,60 @@ jobs:
|
230 | 229 | run: |
|
231 | 230 | cd tubular
|
232 | 231 | pytest tests --config-file=pyproject.toml
|
| 232 | + |
| 233 | + vegafusion: |
| 234 | + env: |
| 235 | + UV_SYSTEM_PYTHON: true |
| 236 | + |
| 237 | + strategy: |
| 238 | + matrix: |
| 239 | + python-version: ["3.11"] |
| 240 | + os: [ubuntu-latest] |
| 241 | + |
| 242 | + runs-on: ${{ matrix.os }} |
| 243 | + steps: |
| 244 | + - uses: actions/checkout@v4 |
| 245 | + - uses: actions/setup-python@v5 |
| 246 | + with: |
| 247 | + python-version: ${{ matrix.python-version }} |
| 248 | + - name: Install uv |
| 249 | + uses: astral-sh/setup-uv@v3 |
| 250 | + with: |
| 251 | + enable-cache: "true" |
| 252 | + cache-suffix: ${{ matrix.python-version }} |
| 253 | + cache-dependency-glob: "**requirements*.txt" |
| 254 | + - name: clone-vegafusion |
| 255 | + run: | |
| 256 | + git clone --single-branch -b v2 https://github.com/vega/vegafusion.git |
| 257 | + cd vegafusion |
| 258 | + git log |
| 259 | + - name: Cache rust dependencies |
| 260 | + uses: Swatinem/rust-cache@v2 |
| 261 | + with: |
| 262 | + workspaces: vegafusion |
| 263 | + - name: Build wheels |
| 264 | + uses: PyO3/maturin-action@v1 |
| 265 | + with: |
| 266 | + command: build |
| 267 | + manylinux: 2014 |
| 268 | + rust-toolchain: stable |
| 269 | + args: --release -m vegafusion/vegafusion-python/Cargo.toml --features=protobuf-src --strip |
| 270 | + - name: Install wheels |
| 271 | + working-directory: vegafusion/target/wheels/ |
| 272 | + run: | |
| 273 | + ls -la |
| 274 | + python -m pip install vegafusion-*manylinux*.whl |
| 275 | +
|
| 276 | + # Optional dependencies |
| 277 | + python -m pip install pyarrow pandas polars-lts-cpu "duckdb>=1.0" "vl-convert-python>=1.0.1rc1" scikit-image "pandas>=2.2" jupytext voila anywidget ipywidgets chromedriver-binary-auto |
| 278 | +
|
| 279 | + # Test dependencies |
| 280 | + python -m pip install pytest altair vega-datasets scikit-image jupytext voila ipykernel anywidget ipywidgets selenium flaky tenacity chromedriver-binary-auto |
| 281 | + - name: Test lazy imports |
| 282 | + working-directory: vegafusion/vegafusion-python/ |
| 283 | + run: python checks/check_lazy_imports.py |
| 284 | + - name: Test vegafusion |
| 285 | + working-directory: vegafusion/vegafusion-python/ |
| 286 | + env: |
| 287 | + VEGAFUSION_TEST_HEADLESS: 1 |
| 288 | + run: pytest |
0 commit comments