Skip to content

Commit 98dbcf4

Browse files
committed
do not test hidden tutorials
1 parent bfb9c04 commit 98dbcf4

File tree

1 file changed

+10
-6
lines changed

1 file changed

+10
-6
lines changed

scripts/generate_matrix.py

+10-6
Original file line numberDiff line numberDiff line change
@@ -26,11 +26,8 @@ def read_index(path):
2626

2727
matrix = []
2828
for tutorial in index["tutorial"]:
29-
notebook = tutorial["notebook"]
30-
31-
if args.notebooks and notebook not in args.notebooks:
32-
# If the user specified a list of notebooks to run, only run those
33-
# otherwise run all of them
29+
if tutorial.get("hidden", False):
30+
# Do not waste CI time on hidden tutorials
3431
continue
3532

3633
if tutorial.get("needs_gpu", False):
@@ -46,10 +43,17 @@ def read_index(path):
4643
if is_haystack2 and not tutorial.get("haystack_2", False):
4744
# Skip Haystack 1.0 tutorials when testing Haystack 2.0
4845
continue
49-
elif not is_haystack2 and tutorial.get("haystack_2", False):
46+
47+
if not is_haystack2 and tutorial.get("haystack_2", False):
5048
# Skip Haystack 2.0 tutorials when testing Haystack 1.0
5149
continue
5250

51+
notebook = tutorial["notebook"]
52+
if args.notebooks and notebook not in args.notebooks:
53+
# If the user specified a list of notebooks to run, only run those
54+
# otherwise run all of them
55+
continue
56+
5357
version = tutorial.get("haystack_version", args.version)
5458
if version[0] != "v":
5559
version = f"v{version}"

0 commit comments

Comments
 (0)