Skip to content

update example

update example #3

Workflow file for this run

name: test
on:
push:
branches: [main]
pull_request: {}
jobs:
test_python:
name: Tests on ${{ matrix.os }}, Python ${{ matrix.python-version }}
runs-on: ${{ matrix.os }}
timeout-minutes: 10
defaults:
run:
shell: bash
strategy:
matrix:
os: [ubuntu-latest]
dependencies: ["core", "core,optional"]
python-version: ["3.8"]
include:
- os: ubuntu-latest
python-version: "3.9"
- os: ubuntu-latest
python-version: "3.10"
- os: ubuntu-latest
python-version: "3.11"
- os: ubuntu-latest
python-version: "3.12"
steps:
- uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
cache: "pip"
# Lint, typecheck
# Each run command runs in a separate shell, so we need to
# reactivate the virtual environment every time
- name: Install marimo-labs with dev dependencies
run: |
python -m venv marimo-dev-env
if [ "$RUNNER_OS" == "Windows" ]; then
marimo-dev-env\\Scripts\\activate
else
source marimo-dev-env/bin/activate
fi
python -m pip install --upgrade pip
pip install .[dev]
- name: Lint
run: |
if [ "$RUNNER_OS" == "Windows" ]; then
marimo-dev-env\\Scripts\\activate
else
source marimo-dev-env/bin/activate
fi
ruff check marimo/
- name: Typecheck
if: ${{ matrix.python-version == '3.9' || matrix.python-version == '3.10' }}
run: |
if [ "$RUNNER_OS" == "Windows" ]; then
marimo-dev-env\\Scripts\\activate
else
source marimo-dev-env/bin/activate
fi
mypy --config-file pyproject.toml marimo/
# Test with minimal dependencies
- name: Test with minimal dependencies
if: ${{ matrix.dependencies == 'core' }}
run: |
python -m venv marimo-test-env
if [ "$RUNNER_OS" == "Windows" ]; then
marimo-test-env\\Scripts\\activate
else
source marimo-test-env/bin/activate
fi
python -m pip install --upgrade pip
pip install .[testcore]
pytest -v tests/
typos:
name: Check for typos
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: crate-ci/[email protected]