File tree Expand file tree Collapse file tree 1 file changed +16
-2
lines changed
Expand file tree Collapse file tree 1 file changed +16
-2
lines changed Original file line number Diff line number Diff line change 3232 run : |
3333 python -m pip install --upgrade pip
3434 pip install .
35- pip install mypy types-requests
35+ pip install pytest pytest-cov mypy types-requests
3636
37- - name : Type check with mypy
37+ - name : Check types
3838 run : |
3939 mypy src
40+
41+ - name : Run tests
42+ run : |
43+ pytest -v --cov=src --cov-report=term-missing | tee coverage.txt
44+ tail -n 10 coverage.txt > coverage_summary.txt
45+
46+ - name : Post test coverage as PR comment
47+ if : matrix.python-version == '3.14'
48+ run : |
49+ body=$(printf "### Test Coverage Summary\n\`\`\`\n%s\n\`\`\`" "$(cat coverage_summary.txt)")
50+ gh api repos/${{ github.repository }}/issues/${{ github.event.pull_request.number }}/comments \
51+ -f body="$body"
52+ env :
53+ GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
You can’t perform that action at this time.
0 commit comments