Skip to content

A reactive notebook for Python — run reproducible experiments, query with SQL, execute as a script, deploy as an app, and version with git. Stored as pure Python. All in a modern, AI-native editor.

chore: use uv in CI (#1117)

Myles Scolnick9c81bb45bd67
diff --git a/.github/workflows/dev-release.yml b/.github/workflows/dev-release.yml
index 13e93c0be7..a670c8c831 100644
--- a/.github/workflows/dev-release.yml
+++ b/.github/workflows/dev-release.yml
@@ -46,6 +46,11 @@ jobs:
python-version: "3.10"
cache: "pip"
+ - name: 🐍 Setup uv
+ uses: yezz123/setup-uv@v4
+ with:
+ uv-venv: marimo-venv
+
# patch __init__.py version to be of the form
# X.Y.<Z+1>-dev{n-commits-since-last-tag}
- name: 🔨 Patch version number
@@ -64,9 +69,8 @@ jobs:
- name: 📦 Build marimo
run: |
- python -m pip install --upgrade pip
- pip install build twine
- pip install .
+ uv pip install build twine
+ uv pip install .
python -m build
- name: 📤 Upload to TestPyPI
diff --git a/.github/workflows/playwright.yml b/.github/workflows/playwright.yml
index 7918306750..a421bae915 100644
--- a/.github/workflows/playwright.yml
+++ b/.github/workflows/playwright.yml
@@ -57,6 +57,13 @@ jobs:
python-version: "3.10"
cache: "pip"
+ # We tried to add uv, but marimo is unable to
+ # start when installed.
+ # - name: 🐍 Setup uv
+ # uses: yezz123/setup-uv@v4
+ # with:
+ # uv-venv: marimo-venv
+
- name: 🐍 Install marimo
run: |
python -m pip install --upgrade pip
diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml
index 248f37534b..c7d34dd9d7 100644
--- a/.github/workflows/release.yml
+++ b/.github/workflows/release.yml
@@ -44,11 +44,15 @@ jobs:
python-version: "3.10"
cache: "pip"
+ - name: 🐍 Setup uv
+ uses: yezz123/setup-uv@v4
+ with:
+ uv-venv: marimo-venv
+
- name: 📦 Build marimo
run: |
- python -m pip install --upgrade pip
- pip install build twine
- pip install .
+ uv pip install build twine
+ uv pip install .
python -m build
- name: 📤 Upload to PyPI
diff --git a/.github/workflows/test.yaml b/.github/workflows/test.yaml
index 72c8edbf94..8cbed43481 100644
--- a/.github/workflows/test.yaml
+++ b/.github/workflows/test.yaml
@@ -108,6 +108,8 @@ jobs:
with:
python-version: ${{ matrix.python-version }}
cache: "pip"
+ - name: 🐍 Setup uv
+ uses: yezz123/setup-uv@v4
# This step is needed since some of our tests rely on the index.html file
- name: Create assets directory, copy over index.html
run: |
@@ -119,18 +121,18 @@ jobs:
# reactivate the virtual environment every time
- name: Install marimo with dev dependencies
run: |
- python -m venv marimo-dev-env
+ uv venv marimo-dev-env
if [ "$RUNNER_OS" == "Windows" ]; then
- marimo-dev-env\\Scripts\\activate
+ source marimo-dev-env\\Scripts\\activate
else
source marimo-dev-env/bin/activate
fi
- python -m pip install --upgrade pip
- pip install .[dev]
+ uv pip install --upgrade pip
+ uv pip install .[dev]
- name: Lint
run: |
if [ "$RUNNER_OS" == "Windows" ]; then
- marimo-dev-env\\Scripts\\activate
+ source marimo-dev-env\\Scripts\\activate
else
source marimo-dev-env/bin/activate
fi
@@ -139,7 +141,7 @@ jobs:
if: ${{ matrix.python-version == '3.9' || matrix.python-version == '3.10' }}
run: |
if [ "$RUNNER_OS" == "Windows" ]; then
- marimo-dev-env\\Scripts\\activate
+ source marimo-dev-env\\Scripts\\activate
else
source marimo-dev-env/bin/activate
fi
@@ -148,27 +150,27 @@ jobs:
- name: Test with minimal dependencies
if: ${{ matrix.dependencies == 'core' }}
run: |
- python -m venv marimo-test-env
+ uv venv marimo-test-env
if [ "$RUNNER_OS" == "Windows" ]; then
- marimo-test-env\\Scripts\\activate
+ source marimo-test-env\\Scripts\\activate
else
source marimo-test-env/bin/activate
fi
- python -m pip install --upgrade pip
- pip install .[testcore]
+ uv pip install --upgrade pip
+ uv pip install .[testcore]
pytest -v tests/ -k "not test_cli"
# Test with optional dependencies
- name: Test with optional dependencies
if: ${{ matrix.dependencies == 'core,optional' }}
run: |
- python -m venv marimo-test-optional-env
+ uv venv marimo-test-optional-env
if [ "$RUNNER_OS" == "Windows" ]; then
- marimo-test-optional-env\\Scripts\\activate
+ source marimo-test-optional-env\\Scripts\\activate
else
source marimo-test-optional-env/bin/activate
fi
- python -m pip install --upgrade pip
- pip install .[testcore,testoptional]
+ uv pip install --upgrade pip
+ uv pip install .[testcore,testoptional]
# Only collect coverage on the 3.11
if [ "${{ matrix.python-version }}" == "3.11" ]; then
pytest -v tests/ -k "not test_cli" --cov=marimo --cov-branch
diff --git a/.github/workflows/test_cli.yaml b/.github/workflows/test_cli.yaml
index 71f4f20812..06e7fb13bf 100644
--- a/.github/workflows/test_cli.yaml
+++ b/.github/workflows/test_cli.yaml
@@ -51,11 +51,15 @@ jobs:
python-version: "3.10"
cache: "pip"
+ - name: 🐍 Setup uv
+ uses: yezz123/setup-uv@v4
+ with:
+ uv-venv: marimo-venv
+
- name: 📦 Build marimo wheel
run: |
- python -m pip install --upgrade pip
- pip install build
- pip install .
+ uv pip install build
+ uv pip install .
python -m build
- name: Upload wheel
@@ -83,6 +87,12 @@ jobs:
python-version: ${{ matrix.python-version }}
cache: "pip"
+ # We tried to add uv, but got the following error:
+ # $ uv pip install marimo*whl
+ # > No solution found when resolving dependencies:
+ # - name: 🐍 Setup uv
+ # uses: yezz123/setup-uv@v4
+
- name: Install Python deps
run: |
python -m pip install --upgrade pip