File tree Expand file tree Collapse file tree 1 file changed +21
-1
lines changed
Expand file tree Collapse file tree 1 file changed +21
-1
lines changed Original file line number Diff line number Diff line change @@ -14,10 +14,30 @@ jobs:
1414 set -euo pipefail
1515 python3 -m pip install mypy
1616 mypy --check-untyped-defs src/__main__.py src/downloader > mypy_output.txt 2>&1 || true
17+
18+ # Count errors
1719 TYPE_ERRORS=$(grep -c "error:" mypy_output.txt || echo "0")
18- cat mypy_output.txt
20+
21+ # Write summary header
1922 echo "**Type Check:** Found $TYPE_ERRORS type errors" >> $GITHUB_STEP_SUMMARY
2023
24+ # Add error list with links
25+ if [ "$TYPE_ERRORS" -gt 0 ]; then
26+ echo "" >> $GITHUB_STEP_SUMMARY
27+ while IFS= read -r line; do
28+ if [[ $line =~ ^([^:]+):([0-9]+):[[:space:]]error:[[:space:]](.+)$ ]]; then
29+ file="${BASH_REMATCH[1]}"
30+ line_num="${BASH_REMATCH[2]}"
31+ message="${BASH_REMATCH[3]}"
32+ url="$GITHUB_SERVER_URL/$GITHUB_REPOSITORY/blob/$GITHUB_SHA/$file#L$line_num"
33+ echo "- [\`$file:$line_num\`]($url): **\`$message\`**" >> $GITHUB_STEP_SUMMARY
34+ fi
35+ done < mypy_output.txt
36+ fi
37+
38+ # Display full output in logs
39+ cat mypy_output.txt
40+
2141 unit-tests :
2242 runs-on : ubuntu-latest
2343 steps :
You can’t perform that action at this time.
0 commit comments