Spaces:
Running
Running
Add GitHub workflow to check for empty cells in marimo notebooks
Browse files
.github/workflows/check-empty-cells.yml
ADDED
|
@@ -0,0 +1,37 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
name: Check for Empty Cells
|
| 2 |
+
|
| 3 |
+
on:
|
| 4 |
+
pull_request:
|
| 5 |
+
branches: [main]
|
| 6 |
+
paths:
|
| 7 |
+
- '**/*.py'
|
| 8 |
+
|
| 9 |
+
jobs:
|
| 10 |
+
check-empty-cells:
|
| 11 |
+
name: Check for empty cells in marimo notebooks
|
| 12 |
+
runs-on: ubuntu-latest
|
| 13 |
+
steps:
|
| 14 |
+
- name: π Cancel Previous Runs
|
| 15 |
+
uses: styfle/[email protected]
|
| 16 |
+
|
| 17 |
+
- name: π Checkout code
|
| 18 |
+
uses: actions/checkout@v4
|
| 19 |
+
|
| 20 |
+
- name: π Set up Python
|
| 21 |
+
uses: actions/setup-python@v5
|
| 22 |
+
with:
|
| 23 |
+
python-version: 3.12
|
| 24 |
+
|
| 25 |
+
- name: π Check for empty cells
|
| 26 |
+
run: |
|
| 27 |
+
python scripts/check_empty_cells.py
|
| 28 |
+
|
| 29 |
+
- name: π Report results
|
| 30 |
+
if: failure()
|
| 31 |
+
run: |
|
| 32 |
+
echo "β Empty cells found in marimo notebooks!"
|
| 33 |
+
echo "Please remove or add content to empty cells before merging."
|
| 34 |
+
echo "Empty cells look like:"
|
| 35 |
+
echo "@app.cell"
|
| 36 |
+
echo "def _():"
|
| 37 |
+
echo " return"
|