mix livebook.test (livebook_test v0.1.0)

Copy Markdown View Source

Runs Livebook notebooks as tests.

This task discovers .livemd files, converts them to Elixir scripts, executes them, and reports results — similar to mix test but for Livebook notebooks.

Usage

mix livebook.test
mix livebook.test --path livebooks/**/*.livemd
mix livebook.test --exclude '**/broken/**/*.livemd'
mix livebook.test --mode local
mix livebook.test --mode remote
mix livebook.test --timeout 120
mix livebook.test --verbose

Options

  • --path — glob pattern for notebook discovery (can be repeated)
  • --exclude — glob pattern to exclude from discovery (can be repeated)
  • --mode — dependency mode: local or remote (default: from config)
  • --timeout — per-notebook timeout in seconds (default: from config)
  • --verbose — enable verbose output with per-notebook details

Exit codes

  • 0 — all notebooks passed
  • 1 — one or more notebooks failed
  • 2 — no notebooks discovered

CI/CD integration

Add to your CI workflow:

- name: Test Livebooks
  run: mix livebook.test

For local dependency testing:

- name: Test Livebooks (local deps)
  run: mix livebook.test --mode local

Configuration

See LivebookTest.Config for application environment configuration.