Skip to content

Commit

Permalink
ci: trigger slow downstream libraries tests suites before release (#1321
Browse files Browse the repository at this point in the history
)



Co-authored-by: Francesco Bruzzesi <[email protected]>

---------

Co-authored-by: Francesco Bruzzesi <[email protected]>
  • Loading branch information
EdAbati and FBruzzesi authored Nov 7, 2024
1 parent 943786e commit 1f3f460
Show file tree
Hide file tree
Showing 3 changed files with 73 additions and 62 deletions.
59 changes: 1 addition & 58 deletions .github/workflows/downstream_tests.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Test Downstream Libraries
name: Test Downstream Libraries - Fast

on:
pull_request:
Expand Down Expand Up @@ -230,60 +230,3 @@ 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
63 changes: 63 additions & 0 deletions .github/workflows/downstream_tests_slow.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
name: Test Downstream Libraries - Slow

on:
workflow_call:
workflow_dispatch:

jobs:
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
13 changes: 9 additions & 4 deletions .github/workflows/publish_to_pypi.yml
Original file line number Diff line number Diff line change
@@ -1,11 +1,18 @@
name: Publish Python 🐍 distribution 📦 to PyPI and TestPyPI

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


jobs:
slow-downstream-tests:
uses: ./.github/workflows/downstream_tests_slow.yml

build:
name: Build distribution 📦
needs: slow-downstream-tests
runs-on: ubuntu-latest

steps:
Expand All @@ -29,9 +36,7 @@ jobs:
path: dist/

publish-to-pypi:
name: >-
Publish Python 🐍 distribution 📦 to PyPI
if: startsWith(github.ref, 'refs/tags/v') # only publish to PyPI on tag pushes
name: Publish Python 🐍 distribution 📦 to PyPI
needs:
- build
runs-on: ubuntu-latest
Expand Down

0 comments on commit 1f3f460

Please sign in to comment.