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.

ci: run changed tests first (#6595)

Myles Scolnick8744e0aa3a67
diff --git a/.github/workflows/test_be.yaml b/.github/workflows/test_be.yaml
index 073c5e8566..30c733f72e 100644
--- a/.github/workflows/test_be.yaml
+++ b/.github/workflows/test_be.yaml
@@ -58,39 +58,39 @@ jobs:
strategy:
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
- dependencies: ['core', 'core,optional']
- python-version: ['3.9']
+ dependencies: ["core", "core,optional"]
+ python-version: ["3.9"]
include:
- os: ubuntu-latest
- python-version: '3.10'
- dependencies: 'core'
+ python-version: "3.10"
+ dependencies: "core"
- os: ubuntu-latest
- python-version: '3.11'
- dependencies: 'core'
+ python-version: "3.11"
+ dependencies: "core"
- os: ubuntu-latest
- python-version: '3.12'
- dependencies: 'core'
+ python-version: "3.12"
+ dependencies: "core"
- os: ubuntu-latest
- python-version: '3.13'
- dependencies: 'core'
+ python-version: "3.13"
+ dependencies: "core"
- os: ubuntu-latest
- python-version: '3.9'
- dependencies: 'core,optional'
+ python-version: "3.9"
+ dependencies: "core,optional"
- os: ubuntu-latest
- python-version: '3.10'
- dependencies: 'core,optional'
+ python-version: "3.10"
+ dependencies: "core,optional"
- os: ubuntu-latest
- python-version: '3.11'
- dependencies: 'core,optional'
+ python-version: "3.11"
+ dependencies: "core,optional"
- os: ubuntu-latest
- python-version: '3.12'
- dependencies: 'core,optional'
+ python-version: "3.12"
+ dependencies: "core,optional"
- os: ubuntu-latest
- python-version: '3.13'
- dependencies: 'core,optional'
+ python-version: "3.13"
+ dependencies: "core,optional"
- os: ubuntu-latest
- python-version: '3.9'
- dependencies: 'minimal'
+ python-version: "3.9"
+ dependencies: "minimal"
steps:
- name: 🛑 Cancel Previous Runs
uses: styfle/[email protected]
@@ -119,13 +119,21 @@ jobs:
- name: Test with base dependencies
if: ${{ matrix.dependencies == 'core' }}
run: |
- hatch run +py=${{ matrix.python-version }} test:test -v tests/ -k "not test_cli" --durations=10
+ hatch run +py=${{ matrix.python-version }} test:test tests/ \
+ -v \
+ -k "not test_cli" \
+ --durations=10 \
+ --picked=first
# Test with optional dependencies
- name: Test with optional dependencies
if: ${{ matrix.dependencies == 'core,optional' }}
run: |
- hatch run +py=${{ matrix.python-version }} test-optional:test -v tests/ -k "not test_cli" --durations=10
+ hatch run +py=${{ matrix.python-version }} test-optional:test tests/ \
+ -v \
+ -k "not test_cli" \
+ --durations=10 \
+ --picked=first
# Test with minimal dependencies using lowest resolution
# https://docs.astral.sh/uv/concepts/resolution/#lowest-resolution
@@ -133,7 +141,11 @@ jobs:
- name: Test with minimal dependencies (lowest resolution)
if: ${{ matrix.dependencies == 'minimal' }}
run: |
- hatch run +py=${{ matrix.python-version }} test:test -v tests/ -k "not test_cli" --durations=10
+ hatch run +py=${{ matrix.python-version }} test:test tests/ \
+ -v \
+ -k "not test_cli" \
+ --durations=10 \
+ --picked=first
env:
UV_RESOLUTION: lowest
diff --git a/pyproject.toml b/pyproject.toml
index 37a9cbb93b..04a310b0b5 100644
--- a/pyproject.toml
+++ b/pyproject.toml
@@ -202,6 +202,7 @@ extra-dependencies = [
"pytest-codecov~=0.6.1",
"pytest-rerunfailures~=15.1",
"pytest-asyncio~=0.26.0",
+ "pytest-picked>=0.5.1",
"inline-snapshot~=0.29.0",
]
@@ -233,6 +234,7 @@ extra-dependencies = [
"pytest-codecov~=0.6.1",
"pytest-rerunfailures~=15.1",
"pytest-asyncio~=0.26.0",
+ "pytest-picked>=0.5.1",
"inline-snapshot~=0.29.0",
"python-lsp-server>=1.10.0",
# For testing mo.ui.chart, table, ...