Skip to content

Commit faac8ec

Browse files
cleanup ignore list parsing
1 parent 143ac51 commit faac8ec

File tree

2 files changed

+10
-8
lines changed

2 files changed

+10
-8
lines changed

.github/workflows/nightly-test.yml

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,11 +21,13 @@ jobs:
2121

2222
- id: get_nbs
2323
run: |
24-
# 1) Read the ignore list into an array
24+
# 1) Read ignore patterns from .github/notebooks-ignore.txt
2525
IGNORE_LIST=()
26-
while IFS= read -r skip_nb; do
26+
while IFS= read -r skip_nb || [ -n "$skip_nb" ]; do
27+
# Skip empty lines or comment lines
28+
[[ -z "$skip_nb" || "$skip_nb" =~ ^# ]] && continue
2729
IGNORE_LIST+=("$skip_nb")
28-
done < .github/ignore-notebooks.txt
30+
done < .github/notebooks-ignore.txt
2931
3032
# 2) Find all .ipynb in python-recipes (or your path)
3133
NBS=$(find python-recipes -name '*.ipynb')

.github/workflows/test.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -26,13 +26,13 @@ jobs:
2626
git fetch --depth=1 origin main
2727
CHANGED_NOTEBOOKS=$(git diff --name-only origin/main | grep '\.ipynb$' || true)
2828
29-
# 1) Read ignore patterns from a file named notebooks-ignore.txt
29+
# 1) Read ignore patterns from .github/notebooks-ignore.txt
3030
IGNORE_LIST=()
31-
while IFS= read -r skip_nb; do
31+
while IFS= read -r skip_nb || [ -n "$skip_nb" ]; do
32+
# Skip empty lines or comment lines
33+
[[ -z "$skip_nb" || "$skip_nb" =~ ^# ]] && continue
3234
IGNORE_LIST+=("$skip_nb")
33-
done < .github/ignore-notebooks.txt
34-
35-
echo "All ignored notebooks: $IGNORE_LIST"
35+
done < .github/notebooks-ignore.txt
3636

3737
# 2) Filter out notebooks in CHANGED_NOTEBOOKS that match ignore patterns
3838
FILTERED_NBS=()

0 commit comments

Comments
 (0)