Skip to content

Commit 2602d97

Browse files
authored
[workflow] Use Sphinx problem matcher on GitHub docs builds (GH-20325)
1 parent 9645930 commit 2602d97

File tree

2 files changed

+43
-1
lines changed

2 files changed

+43
-1
lines changed

.github/problem-matchers/sphinx.json

+40
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
{
2+
"problemMatcher": [
3+
{
4+
"owner": "sphinx-problem-matcher",
5+
"pattern": [
6+
{
7+
"regexp": "^(.*):(\\d+):\\s+(\\w*):\\s+(.*)$",
8+
"file": 1,
9+
"line": 2,
10+
"severity": 3,
11+
"message": 4
12+
}
13+
]
14+
},
15+
{
16+
"owner": "sphinx-problem-matcher-loose",
17+
"pattern": [
18+
{
19+
"_comment": "A bit of a looser pattern, doesn't look for line numbers, just looks for file names relying on them to start with / and end with .rst",
20+
"regexp": "(\/.*\\.rst):\\s+(\\w*):\\s+(.*)$",
21+
"file": 1,
22+
"severity": 2,
23+
"message": 3
24+
}
25+
]
26+
},
27+
{
28+
"owner": "sphinx-problem-matcher-loose-no-severity",
29+
"pattern": [
30+
{
31+
"_comment": "Looks for file names ending with .rst and line numbers but without severity",
32+
"regexp": "^(.*\\.rst):(\\d+):(.*)$",
33+
"file": 1,
34+
"line": 2,
35+
"message": 3
36+
}
37+
]
38+
}
39+
]
40+
}

.github/workflows/doc.yml

+3-1
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,8 @@ jobs:
2525
runs-on: ubuntu-latest
2626
steps:
2727
- uses: actions/checkout@v2
28+
- name: Register Sphinx problem matcher
29+
run: echo "::add-matcher::.github/problem-matchers/sphinx.json"
2830
- name: 'Install Dependencies'
2931
run: sudo ./.github/workflows/posix-deps-apt.sh && sudo apt-get install wamerican
3032
- name: 'Configure CPython'
@@ -34,7 +36,7 @@ jobs:
3436
- name: 'Install build dependencies'
3537
run: make -C Doc/ PYTHON=../python venv
3638
- name: 'Build documentation'
37-
run: xvfb-run make -C Doc/ PYTHON=../python SPHINXOPTS="-q -W -j4" doctest suspicious html
39+
run: xvfb-run make -C Doc/ PYTHON=../python SPHINXOPTS="-q -W --keep-going -j4" doctest suspicious html
3840
- name: 'Upload'
3941
uses: actions/upload-artifact@v1
4042
with:

0 commit comments

Comments
 (0)