Skip to content

.github/workflows/build.yml #1281

.github/workflows/build.yml

.github/workflows/build.yml #1281

Workflow file for this run

name: Build
on:
push:
branches: main
pull_request:
branches: "*"
# pull_request:
# branches: "none-never"
jobs:
build:
runs-on: ${{ matrix.os }}
# runs-on: depot-ubuntu-24.04
strategy:
fail-fast: false
matrix:

Check failure on line 18 in .github/workflows/build.yml

View workflow run for this annotation

GitHub Actions / .github/workflows/build.yml

Invalid workflow file

You have an error in your yaml syntax on line 18
#os: [ubuntu-latest, windows-latest, macos-latest]
#os: [ubuntu-latest]
os: [depot-ubuntu-latest, depot-windows-2025]
python-version: ["3.11"]
steps:
- name: Checkout
uses: actions/checkout@v4
- uses: actions/setup-node@v4
- name: Install uv
uses: astral-sh/setup-uv@v7
with:
enable-cache: true
- name: Install the project
run: uv sync --locked --all-extras --dev
- uses: pnpm/action-setup@v4
with:
node-version: "20.x"
cache: pnpm
package_json_file: packages/package.json
- uses: awalsh128/cache-apt-pkgs-action@latest
with:
packages: pandoc graphviz
- name: Install dependencies
run: |
pnpm install -g codecov
pnpm -C packages/buckaroo-js-core install
- name: Check docs can be build + links
if: ${{ matrix.os == 'ubuntu-latest' }}
# working-directory: docs
run: |
mkdir -p buckaroo/static || true
touch buckaroo/static/compiled.css
touch buckaroo/static/widget.js
touch buckaroo/static/widget.css
echo "about to ls"
ls -alhstr
mkdir -p docs/build/html
uv run pytest --check-links docs/source/*.rst
uv run pytest --check-links docs/example-notebooks/*.ipynb
uv run sphinx-build -T -b html docs/source docs/build
- name: Test the JS extension
run: |
./scripts/full_build.sh
cd packages/buckaroo-js-core
pnpm install && pnpm run build
pnpm run test
env:
UV_PYTHON: ${{ matrix.python-version }}
- name: Linting
if: ${{ matrix.os == 'ubuntu-latest' }}
run: |
# pnpm -C packages/buckaroo-js-core run lint
pip install ruff
ruff check .
- name: Package
run: |
./scripts/full_build.sh
- name: Upload builds
uses: actions/upload-artifact@v4
with:
name: buckaroo-dist-${{ github.run_number }}
path: |
./dist
./js/*.tgz
- name: Run Storybook Playwright Tests
if: ${{ matrix.os == 'ubuntu-latest' }}
run: |
bash scripts/test_playwright_storybook.sh
- name: Run JupyterLab Playwright Tests
if: ${{ matrix.os == 'ubuntu-latest' }}
run: |
# Ensure uv environment is set up
uv sync --all-extras --group dev
# Install the built buckaroo wheel
uv pip install --force-reinstall dist/*.whl
# Install test dependencies (polars, jupyterlab)
uv pip install polars jupyterlab
# Detect venv location (uv sync creates .venv by default, but check if it exists)
if [ -d ".venv" ]; then
VENV_LOCATION=".venv"
else
# Fallback: try to detect from uv's Python environment
VENV_LOCATION=$(uv run python -c "import sys; print(sys.prefix)" 2>/dev/null || echo ".venv")
fi
# Run the integration test script with venv location
bash scripts/test_playwright_jupyter.sh --venv-location="$VENV_LOCATION"
env:
UV_PYTHON: ${{ matrix.python-version }}
# ui-test:
# needs: [build]
# runs-on: ubuntu-latest
# steps:
# - uses: actions/checkout@v4
# - uses: actions/download-artifact@v4
# with:
# name: buckaroo-dist-${{ github.run_number }}
# - name: Install Python
# uses: actions/setup-python@v4
# with:
# python-version: 3.9
# - name: Setup buckaroo ui test
# run: pip install `echo dist/*.whl`[ui-test] -r requirements-ui-test.txt
# - name: Install playwright browsers
# run: playwright install chromium
# - name: Run ui-tests
# run: SOLARA_TEST_RUNNERS=jupyter_lab pytest tests/ui/ --video=retain-on-failure
# - name: Upload Test artifacts
# if: always()
# uses: actions/upload-artifact@v4
# with:
# name: buckaroo-test-results-${{ github.run_number }}
# path: test-results