Skip to content

Commit

Permalink
[CI/Build] Add error matching config for mypy (vllm-project#9512)
Browse files Browse the repository at this point in the history
Signed-off-by: Vinay Damodaran <[email protected]>
  • Loading branch information
russellb authored and vrdn-23 committed Oct 23, 2024
1 parent fb5ca5b commit 7094eae
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 1 deletion.
16 changes: 16 additions & 0 deletions .github/workflows/matchers/mypy.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
{
"problemMatcher": [
{
"owner": "mypy",
"pattern": [
{
"regexp": "^(.+):(\\d+):\\s(error|warning):\\s(.+)$",
"file": 1,
"line": 2,
"severity": 3,
"message": 4
}
]
}
]
}
3 changes: 2 additions & 1 deletion .github/workflows/mypy.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -32,4 +32,5 @@ jobs:
pip install types-setuptools
- name: Mypy
run: |
tools/mypy.sh
echo "::add-matcher::.github/workflows/matchers/mypy.json"
tools/mypy.sh 1
4 changes: 4 additions & 0 deletions tools/mypy.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@

CI=${1:-0}

if [ $CI -eq 1 ]; then
set -e
fi

run_mypy() {
echo "Running mypy on $1"
if [ $CI -eq 1 ] && [ -z "$1" ]; then
Expand Down

0 comments on commit 7094eae

Please sign in to comment.