-
Notifications
You must be signed in to change notification settings - Fork 16
151 lines (127 loc) · 4.35 KB
/
build.yml
File metadata and controls
151 lines (127 loc) · 4.35 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
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:
#os: [ubuntu-latest, windows-latest, macos-latest]
#os: [ubuntu-latest] , depot-windows-2025]
os: [depot-ubuntu-latest]
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