|
61 | 61 | if: runner.os == 'Linux' |
62 | 62 | run: playwright install-deps |
63 | 63 |
|
64 | | - - name: Debug - Print notebook IDs |
65 | | - shell: bash |
66 | | - env: |
67 | | - NOTEBOOKLM_READ_ONLY_NOTEBOOK_ID: ${{ secrets.NOTEBOOKLM_READ_ONLY_NOTEBOOK_ID }} |
68 | | - NOTEBOOKLM_GENERATION_NOTEBOOK_ID: ${{ secrets.NOTEBOOKLM_GENERATION_NOTEBOOK_ID }} |
69 | | - run: | |
70 | | - echo "READ_ONLY_NOTEBOOK_ID: $NOTEBOOKLM_READ_ONLY_NOTEBOOK_ID" |
71 | | - echo "GENERATION_NOTEBOOK_ID: $NOTEBOOKLM_GENERATION_NOTEBOOK_ID" |
72 | | - echo "READ_ONLY length: ${#NOTEBOOKLM_READ_ONLY_NOTEBOOK_ID}" |
73 | | - echo "GENERATION length: ${#NOTEBOOKLM_GENERATION_NOTEBOOK_ID}" |
74 | | -
|
75 | | - - name: Debug - List artifacts in READ_ONLY notebook |
76 | | - if: inputs.test_filter != '' |
77 | | - env: |
78 | | - NOTEBOOKLM_AUTH_JSON: ${{ secrets.NOTEBOOKLM_AUTH_JSON }} |
79 | | - NOTEBOOKLM_READ_ONLY_NOTEBOOK_ID: ${{ secrets.NOTEBOOKLM_READ_ONLY_NOTEBOOK_ID }} |
80 | | - shell: bash |
81 | | - run: | |
82 | | - python3 << 'EOF' |
83 | | - import asyncio |
84 | | - import os |
85 | | - import traceback |
86 | | -
|
87 | | - async def main(): |
88 | | - nb_id = os.environ.get("NOTEBOOKLM_READ_ONLY_NOTEBOOK_ID") |
89 | | - print(f"NOTEBOOKLM_READ_ONLY_NOTEBOOK_ID set: {bool(nb_id)}") |
90 | | - print(f"NOTEBOOKLM_AUTH_JSON set: {bool(os.environ.get('NOTEBOOKLM_AUTH_JSON'))}") |
91 | | -
|
92 | | - if not nb_id: |
93 | | - print("ERROR: NOTEBOOKLM_READ_ONLY_NOTEBOOK_ID not set") |
94 | | - return |
95 | | -
|
96 | | - print(f"Notebook ID: {nb_id}") |
97 | | -
|
98 | | - try: |
99 | | - from notebooklm import NotebookLMClient |
100 | | - print("Creating client...") |
101 | | - client = await NotebookLMClient.from_storage() |
102 | | - print(f"Client created, auth cookies: {len(client.auth.cookies)} cookies") |
103 | | -
|
104 | | - async with client: |
105 | | - print("Client opened, fetching artifacts...") |
106 | | - raw = await client.artifacts._list_raw(nb_id) |
107 | | - print(f"Total raw artifacts: {len(raw)}") |
108 | | -
|
109 | | - for i, a in enumerate(raw): |
110 | | - if isinstance(a, list) and len(a) > 4: |
111 | | - art_type = a[2] |
112 | | - status = a[4] |
113 | | - title = a[1] if len(a) > 1 else "?" |
114 | | - length = len(a) |
115 | | - type_names = {1: "AUDIO", 2: "REPORT", 3: "VIDEO", 4: "QUIZ/FLASH", |
116 | | - 5: "MIND_MAP", 7: "INFOGRAPHIC", 8: "SLIDE_DECK", 9: "DATA_TABLE"} |
117 | | - type_name = type_names.get(art_type, f"TYPE_{art_type}") |
118 | | - status_name = {1: "PROCESSING", 2: "PENDING", 3: "COMPLETED"}.get(status, f"STATUS_{status}") |
119 | | - print(f" [{i}] {type_name} | {status_name} | len={length} | {title[:50]}") |
120 | | -
|
121 | | - if art_type == 2: |
122 | | - has_content = len(a) > 7 and a[7] is not None |
123 | | - print(f" → len>7: {length > 7}, status==3: {status == 3}, has_content: {has_content}") |
124 | | - except Exception as e: |
125 | | - print(f"ERROR: {type(e).__name__}: {e}") |
126 | | - traceback.print_exc() |
127 | | -
|
128 | | - asyncio.run(main()) |
129 | | - EOF |
130 | | -
|
131 | 64 | - name: Run E2E tests |
132 | 65 | env: |
133 | 66 | NOTEBOOKLM_AUTH_JSON: ${{ secrets.NOTEBOOKLM_AUTH_JSON }} |
|
0 commit comments