Skip to content

Commit d07602d

Browse files
committed
ENH: only run diffed content
1 parent 6ce80fc commit d07602d

File tree

1 file changed

+9
-2
lines changed

1 file changed

+9
-2
lines changed

test.sh

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,17 @@ notebook_files=()
55

66
# Find Markdown files convert.
77
all_markdown_files=$(find tutorials -type f -name "*.md")
8+
89
if [ $# -gt 0 ]; then
9-
files_to_process="$@"
10+
if [[ "$1" == all ]]; then
11+
files_to_process=$all_markdown_files
12+
else
13+
files_to_process="$@"
14+
fi
15+
1016
else
11-
files_to_process=$all_markdown_files
17+
# We only want to run tests for the notebooks we touched
18+
files_to_process=$(git fetch origin main --depth=1; git diff origin/main --name-only tutorials | grep .md)
1219
fi
1320

1421
# Identify Markdown files that are Jupytext and convert them all.

0 commit comments

Comments
 (0)