fix(deps): update dependency marimo to v0.15.2 #119
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# This workflow runs and tests all Marimo notebooks in the project | |
# It creates a matrix of jobs, one for each notebook, and runs them in parallel | |
name: "Marimo" | |
permissions: | |
contents: read | |
on: | |
- push | |
jobs: | |
# Parse .env file and build a matrix of notebooks to test | |
list-notebooks: | |
runs-on: ubuntu-latest | |
outputs: | |
notebook-list: ${{ steps.notebooks.outputs.matrix }} | |
steps: | |
# Check out the repository code | |
- uses: actions/checkout@v5 | |
# Find all Python files in the marimo folder and create a matrix for parallel execution | |
- name: Find notebooks and build matrix | |
id: notebooks | |
run: | | |
NOTEBOOK_DIR="book/marimo" | |
echo "Searching notebooks in: $NOTEBOOK_DIR" | |
# Check if directory exists | |
if [ ! -d "$NOTEBOOK_DIR" ]; then | |
echo "Directory $NOTEBOOK_DIR does not exist. Setting empty matrix." | |
echo "matrix=[]" >> "$GITHUB_OUTPUT" | |
exit 0 | |
fi | |
# Find notebooks and handle empty results | |
if [ -z "$(find "$NOTEBOOK_DIR" -maxdepth 1 -name "*.py" 2>/dev/null)" ]; then | |
echo "No notebooks found in $NOTEBOOK_DIR. Setting empty matrix." | |
echo "matrix=[]" >> "$GITHUB_OUTPUT" | |
else | |
notebooks=$(find "$NOTEBOOK_DIR" -maxdepth 1 -name "*.py" -print0 | xargs -0 -n1 echo | jq -R -s -c 'split("\n")[:-1]') | |
echo "matrix=$notebooks" >> "$GITHUB_OUTPUT" | |
fi | |
shell: bash | |
# Create one job per notebook using the matrix strategy for parallel execution | |
test-notebooks: | |
if: needs.list-notebooks.outputs.notebook-list != '[]' | |
runs-on: ubuntu-latest | |
needs: list-notebooks | |
strategy: | |
matrix: | |
notebook: ${{ fromJson(needs.list-notebooks.outputs.notebook-list) }} | |
# Don't fail the entire workflow if one notebook fails | |
fail-fast: false | |
name: Run notebook ${{ matrix.notebook }} | |
steps: | |
# Check out the repository code | |
- uses: actions/checkout@v5 | |
# Use the composite action to set up the project | |
- name: Setup the project | |
uses: ./.github/actions/setup-project | |
# Execute the notebook with the appropriate runner based on its content | |
- name: Run notebook | |
run: | | |
uv run "${{ matrix.notebook }}" | |
shell: bash |