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 dorny/paths-filter (#2321)

Myles Scolnickb51a594164af
diff --git a/.github/workflows/playwright.yml b/.github/workflows/playwright.yml
index 96f473035e..e97b46bc5d 100644
--- a/.github/workflows/playwright.yml
+++ b/.github/workflows/playwright.yml
@@ -3,13 +3,7 @@ name: playwright
on:
push:
branches: [main]
- paths-ignore:
- - 'docs/**'
- - README.md
pull_request:
- paths-ignore:
- - 'docs/**'
- - README.md
env:
TURBO_TOKEN: ${{ secrets.TURBO_TOKEN }}
@@ -17,7 +11,24 @@ env:
MARIMO_SKIP_UPDATE_CHECK: 1
jobs:
+ changes:
+ runs-on: ubuntu-latest
+ outputs:
+ playwright: ${{ steps.filter.outputs.playwright }}
+ steps:
+ - uses: actions/checkout@v4
+ - uses: dorny/paths-filter@v3
+ id: filter
+ with:
+ filters: |
+ playwright:
+ - '**'
+ - '!docs/**'
+ - '!README.md'
+
test:
+ needs: changes
+ if: ${{ needs.changes.outputs.playwright == 'true' }}
timeout-minutes: 16
runs-on: ubuntu-latest
defaults:
diff --git a/.github/workflows/test_be.yaml b/.github/workflows/test_be.yaml
index 370ba6ffb5..6373cb0ba0 100644
--- a/.github/workflows/test_be.yaml
+++ b/.github/workflows/test_be.yaml
@@ -1,26 +1,32 @@
name: Test BE
-# Run on push to main and pull requests
-# only for backend changes
on:
push:
branches: [main]
- paths:
- - 'marimo/**'
- - 'tests/**'
- - 'pyproject.toml'
pull_request:
- paths:
- - 'marimo/**'
- - 'tests/**'
- - 'pyproject.toml'
env:
MARIMO_SKIP_UPDATE_CHECK: 1
jobs:
+ changes:
+ runs-on: ubuntu-latest
+ outputs:
+ backend: ${{ steps.filter.outputs.backend }}
+ steps:
+ - uses: actions/checkout@v4
+ - uses: dorny/paths-filter@v3
+ id: filter
+ with:
+ filters: |
+ backend:
+ - 'marimo/**'
+ - 'tests/**'
+ - 'pyproject.toml'
+
test_python:
- # short name otherwise GitHub Actions will truncate it
+ needs: changes
+ if: ${{ needs.changes.outputs.backend == 'true' }}
name: ${{ matrix.os }} / Py ${{ matrix.python-version }} / ${{ matrix.dependencies }} deps
runs-on: ${{ matrix.os }}
timeout-minutes: 15
diff --git a/.github/workflows/test_cli.yaml b/.github/workflows/test_cli.yaml
index 9f4bdaee87..6aaad146de 100644
--- a/.github/workflows/test_cli.yaml
+++ b/.github/workflows/test_cli.yaml
@@ -3,13 +3,7 @@ name: cli test
on:
push:
branches: [main]
- paths-ignore:
- - 'docs/**'
- - README.md
pull_request:
- paths-ignore:
- - 'docs/**'
- - README.md
env:
TURBO_TOKEN: ${{ secrets.TURBO_TOKEN }}
@@ -17,7 +11,24 @@ env:
MARIMO_SKIP_UPDATE_CHECK: 1
jobs:
+ changes:
+ runs-on: ubuntu-latest
+ outputs:
+ cli: ${{ steps.filter.outputs.cli }}
+ steps:
+ - uses: actions/checkout@v4
+ - uses: dorny/paths-filter@v3
+ id: filter
+ with:
+ filters: |
+ cli:
+ - '**'
+ - '!docs/**'
+ - '!README.md'
+
build_wheel:
+ needs: changes
+ if: ${{ needs.changes.outputs.cli == 'true' }}
name: Build marimo wheel
runs-on: ubuntu-latest
timeout-minutes: 10
@@ -77,8 +88,9 @@ jobs:
retention-days: 1
test_cli:
+ needs: [changes, build_wheel]
+ if: ${{ needs.changes.outputs.cli == 'true' }}
name: Tests CLI on ${{ matrix.os }} ${{ matrix.python-version }}
- needs: build_wheel
runs-on: ${{ matrix.os }}
timeout-minutes: 15
strategy:
@@ -116,8 +128,9 @@ jobs:
run: pytest -v tests/_cli/test_cli.py tests/_cli/test_cli_export.py
test_examples:
+ needs: [changes, build_wheel]
+ if: ${{ needs.changes.outputs.cli == 'true' }}
name: Tests examples and smoke_tests
- needs: build_wheel
runs-on: ubuntu-latest
timeout-minutes: 15
diff --git a/.github/workflows/test_fe.yaml b/.github/workflows/test_fe.yaml
index e7b00dece5..1601fa8bc3 100644
--- a/.github/workflows/test_fe.yaml
+++ b/.github/workflows/test_fe.yaml
@@ -1,19 +1,9 @@
name: Test FE
-# Run on push to main and pull requests
-# only for changes in the frontend directory
on:
push:
branches: [main]
- paths:
- - 'frontend/**'
- - 'lsp/**'
- - 'openapi/**'
pull_request:
- paths:
- - 'frontend/**'
- - 'lsp/**'
- - 'openapi/**'
env:
TURBO_TOKEN: ${{ secrets.TURBO_TOKEN }}
@@ -21,7 +11,24 @@ env:
MARIMO_SKIP_UPDATE_CHECK: 1
jobs:
+ changes:
+ runs-on: ubuntu-latest
+ outputs:
+ frontend: ${{ steps.filter.outputs.frontend }}
+ steps:
+ - uses: actions/checkout@v4
+ - uses: dorny/paths-filter@v3
+ id: filter
+ with:
+ filters: |
+ frontend:
+ - 'frontend/**'
+ - 'lsp/**'
+ - 'openapi/**'
+
test_frontend:
+ needs: changes
+ if: ${{ needs.changes.outputs.frontend == 'true' }}
name: 🖥️ Lint, test, build frontend
runs-on: ubuntu-latest
timeout-minutes: 15