Skip to content

Commit

Permalink
ci: add vegafusion in ci checks (#1228)
Browse files Browse the repository at this point in the history
  • Loading branch information
EdAbati authored Nov 2, 2024
1 parent 8763535 commit abd9d4a
Show file tree
Hide file tree
Showing 2 changed files with 69 additions and 5 deletions.
64 changes: 60 additions & 4 deletions .github/workflows/downstream_tests.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
name: Test Downstream Libraries

on:
pull_request:
push:
branches: [main]
on:
workflow_call:
workflow_dispatch:

jobs:
altair:
Expand Down Expand Up @@ -230,3 +229,60 @@ jobs:
run: |
cd tubular
pytest tests --config-file=pyproject.toml
vegafusion:
env:
UV_SYSTEM_PYTHON: true

strategy:
matrix:
python-version: ["3.11"]
os: [ubuntu-latest]

runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Install uv
uses: astral-sh/setup-uv@v3
with:
enable-cache: "true"
cache-suffix: ${{ matrix.python-version }}
cache-dependency-glob: "**requirements*.txt"
- name: clone-vegafusion
run: |
git clone --single-branch -b v2 https://github.com/vega/vegafusion.git
cd vegafusion
git log
- name: Cache rust dependencies
uses: Swatinem/rust-cache@v2
with:
workspaces: vegafusion
- name: Build wheels
uses: PyO3/maturin-action@v1
with:
command: build
manylinux: 2014
rust-toolchain: stable
args: --release -m vegafusion/vegafusion-python/Cargo.toml --features=protobuf-src --strip
- name: Install wheels
working-directory: vegafusion/target/wheels/
run: |
ls -la
python -m pip install vegafusion-*manylinux*.whl
# Optional dependencies
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
# Test dependencies
python -m pip install pytest altair vega-datasets scikit-image jupytext voila ipykernel anywidget ipywidgets selenium flaky tenacity chromedriver-binary-auto
- name: Test lazy imports
working-directory: vegafusion/vegafusion-python/
run: python checks/check_lazy_imports.py
- name: Test vegafusion
working-directory: vegafusion/vegafusion-python/
env:
VEGAFUSION_TEST_HEADLESS: 1
run: pytest
10 changes: 9 additions & 1 deletion .github/workflows/publish_to_pypi.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,16 @@
name: Publish Python 🐍 distribution 📦 to PyPI and TestPyPI

on: push
on:
push:
branches: [main]
tags:
- "v[0-9]+.[0-9]+.[0-9]+*"


jobs:
downstream-tests:
uses: ./.github/workflows/downstream_tests.yml

build:
name: Build distribution 📦
runs-on: ubuntu-latest
Expand Down

0 comments on commit abd9d4a

Please sign in to comment.