Skip to content

Commit 1e4be8f

Browse files
committed
add problemMatcher
1 parent 1abc02c commit 1e4be8f

File tree

2 files changed

+22
-1
lines changed

2 files changed

+22
-1
lines changed
+18
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
{
2+
"problemMatcher": [
3+
{
4+
"owner": "python",
5+
"pattern": [
6+
{
7+
"regexp": "^\\s*File\\s\\\"(.*)\\\",\\sline\\s(\\d+),\\sin\\s(.*)$",
8+
"file": 1,
9+
"line": 2
10+
},
11+
{
12+
"regexp": "^\\s*raise\\s(.*)\\(\\'(.*)\\'\\)$",
13+
"message": 2
14+
}
15+
]
16+
}
17+
]
18+
}

.github/workflows/tox.yml

+4-1
Original file line numberDiff line numberDiff line change
@@ -20,10 +20,13 @@ jobs:
2020
uses: actions/setup-python@v2
2121
with:
2222
python-version: ${{ matrix.python-version }}
23+
- name: Register Python problem matcher
24+
run: |
25+
echo "::add-matcher::.github/workflows/matchers/pytest.json"
2326
- name: Install dependencies
2427
run: |
2528
python -m pip install --upgrade pip
26-
pip install tox tox-gh-actions
29+
pip install tox tox-gh-actions pytest-github-actions-annotate-failures
2730
- name: Test with tox
2831
run: tox -vv
2932
env:

0 commit comments

Comments
 (0)