File tree Expand file tree Collapse file tree 2 files changed +5
-9
lines changed Expand file tree Collapse file tree 2 files changed +5
-9
lines changed Original file line number Diff line number Diff line change 85
85
cache : " pip"
86
86
cache-dependency-path : " pyproject.toml"
87
87
- name : Install fonts
88
+ # This is required until sphinx-opengraph fixes their fallback
88
89
run : sudo apt-get install -y fonts-roboto
89
90
90
91
- name : Install dependencies
@@ -106,11 +107,12 @@ jobs:
106
107
shell : python
107
108
run : |
108
109
from pathlib import Path
110
+ import re
109
111
text = Path("./warnings.txt").read_text().strip()
110
- expected_warning_snippets = ["kitchen-sink", "urllib/parse.py"]
112
+ expected_warning_patterns = [r "kitchen\ -sink", r "urllib/parse\ .py", r"Glyph 10024 .*? missing from current font "]
111
113
print("\n=== Sphinx Warnings ===\n\n" + text) # Print just for reference so we can look at the logs
112
- unexpected = [ii for ii in text.split("\n" ) if not any(snippet in ii for snippet in expected_warning_snippets )]
113
- assert len(unexpected) == 0
114
+ unexpected = [l for l in text.splitlines( ) if not any(re.search(p, ii) for p in expected_warning_patterns )]
115
+ assert len(unexpected) == 0, unexpected
114
116
115
117
- name : Audit with Lighthouse
116
118
Original file line number Diff line number Diff line change 2
2
import os
3
3
from urllib .request import urlopen
4
4
from pathlib import Path
5
- import warnings
6
5
7
6
project = "Sphinx Book Theme"
8
7
copyright = "2023"
36
35
"sphinx.ext.todo" ,
37
36
]
38
37
39
- # Ignore Glyph 10024 (\N{SPARKLES}) missing from current font from "sphinxext.opengraph"
40
- warnings .filterwarnings (
41
- "ignore" , "Glyph 10024 .*? missing from current font" , UserWarning
42
- )
43
-
44
38
# Add any paths that contain templates here, relative to this directory.
45
39
templates_path = ["_templates" ]
46
40
You can’t perform that action at this time.
0 commit comments