Skip to content

uploaded first notebooks from notebook competition #60

uploaded first notebooks from notebook competition

uploaded first notebooks from notebook competition #60

Workflow file for this run

name: Check marimo notebooks
on:
pull_request:
branches: [main]
paths:
- "notebooks/**/*.py"
jobs:
check-notebooks:
name: marimo check
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4
- uses: astral-sh/setup-uv@d4b2f3b6ecc6e67c4457f6d3e41ec42d3d0fcb86 # v5
- name: Get changed notebook files
id: changed
run: |
files=$(gh pr diff ${{ github.event.pull_request.number }} --name-only | grep '^notebooks/.*\.py$' || true)
# Filter to only marimo notebooks (files containing "import marimo" and "app = marimo.App")
notebook_files=""
for f in $files; do
if [ -f "$f" ] && grep -q "import marimo" "$f" && grep -q "app = marimo.App" "$f"; then
notebook_files="$notebook_files $f"
fi
done
notebook_files=$(echo "$notebook_files" | xargs)
echo "files=$notebook_files" >> "$GITHUB_OUTPUT"
env:
GH_TOKEN: ${{ github.token }}
- name: Run marimo check
if: steps.changed.outputs.files != ''
run: uvx marimo check ${{ steps.changed.outputs.files }}