Skip to content

Commit abd9d4a

Browse files
authored
ci: add vegafusion in ci checks (#1228)
1 parent 8763535 commit abd9d4a

File tree

2 files changed

+69
-5
lines changed

2 files changed

+69
-5
lines changed

.github/workflows/downstream_tests.yml

Lines changed: 60 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,8 @@
11
name: Test Downstream Libraries
22

3-
on:
4-
pull_request:
5-
push:
6-
branches: [main]
3+
on:
4+
workflow_call:
5+
workflow_dispatch:
76

87
jobs:
98
altair:
@@ -230,3 +229,60 @@ jobs:
230229
run: |
231230
cd tubular
232231
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

.github/workflows/publish_to_pypi.yml

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,16 @@
11
name: Publish Python 🐍 distribution 📦 to PyPI and TestPyPI
22

3-
on: push
3+
on:
4+
push:
5+
branches: [main]
6+
tags:
7+
- "v[0-9]+.[0-9]+.[0-9]+*"
8+
49

510
jobs:
11+
downstream-tests:
12+
uses: ./.github/workflows/downstream_tests.yml
13+
614
build:
715
name: Build distribution 📦
816
runs-on: ubuntu-latest

0 commit comments

Comments
 (0)