Skip to content

Commit 5fff4bc

Browse files
2 parents af06eb0 + 20e4c18 commit 5fff4bc

4 files changed

Lines changed: 75 additions & 0 deletions

File tree

.github/workflows/lint.yml

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
name: Lint
2+
on: [push, pull_request]
3+
jobs:
4+
lint:
5+
runs-on: ubuntu-latest
6+
steps:
7+
- uses: actions/checkout@v4
8+
- uses: actions/setup-python@v5
9+
with:
10+
python-version: '3.10'
11+
- name: Install dependencies
12+
run: pip install ruff
13+
- name: Run ruff
14+
run: ruff check .
15+
16+

.github/workflows/tests.yml

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
name: Test
2+
3+
on: [push, pull_request]
4+
5+
jobs:
6+
test:
7+
runs-on: ubuntu-latest
8+
steps:
9+
- uses: actions/checkout@v4
10+
- uses: actions/setup-python@v5
11+
with:
12+
python-version: '3.10'
13+
- name: Install dependencies
14+
run: pip install -r requirements.txt
15+
- name: Run tests with pytest
16+
run: pytest
Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
name: Validate Notebooks
2+
3+
on:
4+
push:
5+
paths:
6+
- '**.ipynb'
7+
8+
jobs:
9+
validate:
10+
runs-on: ubuntu-latest
11+
steps:
12+
- name: Checkout Code
13+
uses: actions/checkout@v4
14+
with:
15+
# Required to fetch the history for 'tj-actions/changed-files'
16+
fetch-depth: 0
17+
18+
- name: Get changed notebooks
19+
id: changed-notebooks
20+
uses: tj-actions/changed-files@v44
21+
with:
22+
files: |
23+
**.ipynb
24+
25+
- name: Setup Python and Dependencies
26+
if: steps.changed-notebooks.outputs.any_changed == 'true'
27+
uses: actions/setup-python@v5
28+
with:
29+
python-version: '3.10'
30+
31+
- name: Install dependencies
32+
if: steps.changed-notebooks.outputs.any_changed == 'true'
33+
run: pip install -r requirements.txt
34+
35+
- name: Run changed notebooks
36+
if: steps.changed-notebooks.outputs.any_changed == 'true'
37+
run: |
38+
for notebook in ${{ steps.changed-notebooks.outputs.all_changed_files }}; do
39+
echo "--- Validating ${notebook} ---"
40+
jupyter nbconvert --to script --execute "${notebook}"
41+
done

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -205,3 +205,5 @@ cython_debug/
205205
marimo/_static/
206206
marimo/_lsp/
207207
__marimo__/
208+
209+
.DS_Store

0 commit comments

Comments
 (0)