Skip to content

exclude notebook from ruff check #27

exclude notebook from ruff check

exclude notebook from ruff check #27

Workflow file for this run

on:
# Run on any push to master.
push:
branches:
- master
# Run on published releases.
release:
types:
- published
jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- id: cache
uses: actions/cache@v4
# Keep uv cache and Python virtual environment.
with:
key: ${{ hashFiles('pyproject.toml', 'uv.lock') }}
path: |
~/.local/share/uv
.venv
- run: |
# Test
curl -LsSf https://astral.sh/uv/install.sh | sh
uvx ruff format --check --exclude notebook.py # marimo manages notebook formatting
uv run --python 3.11 -m pytest -v
uv run --python 3.12 -m pytest -v
uv run --python 3.13 -m pytest -v
publish:
needs: test
# Only publish if releasing.
if: startsWith(github.ref, 'refs/tags/')
runs-on: ubuntu-latest
permissions:
# Allows JWT to be requested from GitHub's OIDC provider for publishing to PyPI.
id-token: write
steps:
- uses: actions/checkout@v4
- id: cache
uses: actions/cache@v4
# Keep uv cache and Python virtual environment.
with:
key: ${{ hashFiles('pyproject.toml', 'uv.lock') }}
path: |
~/.local/share/uv
.venv
- run: |
# Build and publish to PyPI.
curl -LsSf https://astral.sh/uv/install.sh | sh
uv build
uv publish